aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/gnus/ecomplete.el
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2010-11-09 20:08:15 -0800
committerGlenn Morris <[email protected]>2010-11-09 20:08:15 -0800
commit6f0d4bb6b2793e06eb445cd58be0e4797f1030c0 (patch)
tree2b2caed0460cd8d07e23d7ee830c9b7a4d1a1ad7 /lisp/gnus/ecomplete.el
parent73171bd4cc3333a43ef8810ba4f7d0a864f20fa8 (diff)
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.
Diffstat (limited to 'lisp/gnus/ecomplete.el')
-rw-r--r--lisp/gnus/ecomplete.el15
1 files changed, 5 insertions, 10 deletions
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 <[email protected]>
;; 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))