(defun ecomplete-add-item (type key text)
(let ((elems (assq type ecomplete-database))
- (now (string-to-number
- (format "%.0f" (if (featurep 'emacs)
- (float-time)
- (require 'gnus-util)
- (gnus-float-time)))))
+ (now (string-to-number (format "%.0f" (float-time))))
entry)
(unless elems
(push (setq elems (list type)) ecomplete-database))
(aset deadline 1 minute)
(aset deadline 2 hour)
;; Convert to seconds.
- (setq deadline (gnus-float-time (apply 'encode-time
- (append deadline nil))))
+ (setq deadline (float-time (apply 'encode-time
+ (append deadline nil))))
;; If this time has passed already, add a day.
- (when (< deadline (gnus-float-time))
+ (when (< deadline (float-time))
(setq deadline (+ 86400 deadline))) ; 86400 secs/day
;; Convert seconds to date header.
(setq deadline (message-make-date
(t
(setq delay (* num 60))))
(setq deadline (message-make-date
- (seconds-to-time (+ (gnus-float-time) delay)))))
+ (seconds-to-time (+ (float-time) delay)))))
(t (error "Malformed delay `%s'" delay)))
(message-add-header (format "%s: %s" gnus-delay-header deadline)))
(set-buffer-modified-p t)
Returns \" ? \" if there's bad input or if another error occurs.
Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"."
(condition-case ()
- (let* ((messy-date (gnus-float-time (gnus-date-get-time messy-date)))
- (now (gnus-float-time))
+ (let* ((messy-date (float-time (gnus-date-get-time messy-date)))
+ (now (float-time))
;;If we don't find something suitable we'll use this one
(my-format "%b %d '%y"))
(let* ((difference (- now messy-date))
(defun gnus-thread-latest-date (thread)
"Return the highest article date in THREAD."
(apply 'max
- (mapcar (lambda (header) (gnus-float-time
+ (mapcar (lambda (header) (float-time
(gnus-date-get-time
(mail-header-date header))))
(message-flatten-list thread))))
gnus-iswitchb-completing-read)))
(defcustom gnus-completion-styles
- (if (and (boundp 'completion-styles-alist)
- (boundp 'completion-styles))
- (append (when (and (assq 'substring completion-styles-alist)
- (not (memq 'substring completion-styles)))
- (list 'substring))
- completion-styles)
- nil)
+ (append (when (and (assq 'substring completion-styles-alist)
+ (not (memq 'substring completion-styles)))
+ (list 'substring))
+ completion-styles)
"Value of `completion-styles' to use when completing."
:version "24.1"
:group 'gnus-meta
(and (= (car fdate) (car date))
(> (nth 1 fdate) (nth 1 date))))))
-;; Every version of Emacs Gnus supports has built-in float-time.
-;; The featurep test silences an irritating compiler warning.
-(defalias 'gnus-float-time
- (if (or (featurep 'emacs)
- (fboundp 'float-time))
- 'float-time 'time-to-seconds))
-
;;; Keymap macros.
(defmacro gnus-local-set-keys (&rest plist)
0)
(funcall callback mail-source-crash-box info)))
-(autoload 'gnus-float-time "gnus-util")
-
(defvar mail-source-incoming-last-checked-time nil)
(defun mail-source-delete-crash-box ()
;; Don't check for old incoming files more than once per day to
;; save a lot of file accesses.
(when (or (null mail-source-incoming-last-checked-time)
- (> (gnus-float-time
+ (> (float-time
(time-since mail-source-incoming-last-checked-time))
(* 24 60 60)))
(setq mail-source-incoming-last-checked-time (current-time))
(with-current-buffer buffer
(when (and nnimap-object
(nnimap-last-command-time nnimap-object)
- (> (gnus-float-time
+ (> (float-time
(time-subtract
now
(nnimap-last-command-time nnimap-object)))
"\\([^ ]+\\) +\\([0-9]+\\)[0-9][0-9][0-9] "))
(zerop (forward-line -1))))
;; We require nnheader which requires gnus-util.
- (let ((seconds (gnus-float-time (date-to-time date)))
+ (let ((seconds (float-time (date-to-time date)))
groups)
;; Go through lines and add the latest groups to a list.
(while (and (looking-at "\\([^ ]+\\) +[0-9]+ ")