From 6f0d4bb6b2793e06eb445cd58be0e4797f1030c0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 9 Nov 2010 20:08:15 -0800 Subject: time-to-seconds related simplifications. * lisp/gnus/gnus-util.el (with-no-warnings): Remove compat stub, now unused. (gnus-float-time): On Emacs, always an alias. * lisp/gnus/ecomplete.el (with-no-warnings): Remove compat stub, now unused. (ecomplete-add-item): Use float-time on Emacs, else gnus-float-time. * lisp/textmodes/remember.el (remember-time-to-seconds): Remove. (remember-store-in-mailbox): Use float-time. * lisp/calendar/timeclock.el (timeclock-time-to-seconds): Make it an alias. * lisp/calendar/time-date.el (time-to-seconds): Always an alias on Emacs, never a real function. (with-no-warnings): Remove compat stub, now unused. (time-less-p): Doc fix. (time-to-number-of-days): Simplify. --- lisp/gnus/ecomplete.el | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'lisp/gnus/ecomplete.el') diff --git a/lisp/gnus/ecomplete.el b/lisp/gnus/ecomplete.el index 33d2ddd6a7..1f70567496 100644 --- a/lisp/gnus/ecomplete.el +++ b/lisp/gnus/ecomplete.el @@ -1,6 +1,7 @@ ;;; ecomplete.el --- electric completion of addresses and the like -;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: mail @@ -27,11 +28,6 @@ (eval-when-compile (require 'cl)) -(eval-when-compile - (unless (fboundp 'with-no-warnings) - (defmacro with-no-warnings (&rest body) - `(progn ,@body)))) - (defgroup ecomplete nil "Electric completion of email addresses and the like." :group 'mail) @@ -61,11 +57,10 @@ (defun ecomplete-add-item (type key text) (let ((elems (assq type ecomplete-database)) (now (string-to-number - (format "%.0f" (if (and (fboundp 'float-time) - (subrp (symbol-function 'float-time))) + (format "%.0f" (if (featurep 'emacs) (float-time) - (with-no-warnings - (time-to-seconds (current-time))))))) + (require 'gnus-util) + (gnus-float-time))))) entry) (unless elems (push (setq elems (list type)) ecomplete-database)) -- cgit v1.2.3