]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/ecomplete.el
Merge from mainline.
[gnu-emacs] / lisp / gnus / ecomplete.el
index c2a22e3230c2e952502791f686bdfcf532ed0065..ece8f2deff499a00ecace8138978c48a270181df 100644 (file)
 (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)
 (defun ecomplete-add-item (type key text)
   (let ((elems (assq type ecomplete-database))
        (now (string-to-number
-             (format "%.0f" (if (featurep 'xemacs)
-                                (time-to-seconds (current-time))
-                              (float-time)))))
+             (format "%.0f" (if (and (fboundp 'float-time)
+                                     (subrp (symbol-function 'float-time)))
+                                (float-time)
+                              (with-no-warnings
+                                (time-to-seconds (current-time)))))))
        entry)
     (unless elems
       (push (setq elems (list type)) ecomplete-database))