Remove the gnus-float-time alias

* lisp/gnus/gnus-util.el (gnus-completion-styles): Remove
compat code.
(gnus-float-time): Remove.
This commit is contained in:
Lars Ingebrigtsen 2016-02-13 17:27:26 +11:00
parent 2443e3801e
commit bfee9fab2f
7 changed files with 15 additions and 31 deletions

View file

@ -55,11 +55,7 @@
(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))

View file

@ -103,10 +103,10 @@ DELAY is a string, giving the length of the time. Possible values are:
(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
@ -129,7 +129,7 @@ DELAY is a string, giving the length of the time. Possible values are:
(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)

View file

@ -3848,8 +3848,8 @@ respectively."
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))
@ -5061,7 +5061,7 @@ Unscored articles will be counted as having a score of zero."
(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))))

View file

@ -52,13 +52,10 @@
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
@ -291,13 +288,6 @@ Symbols are also allowed; their print names are used instead."
(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)

View file

@ -629,8 +629,6 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
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 ()
@ -651,7 +649,7 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
;; 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))

View file

@ -365,7 +365,7 @@ textual parts.")
(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)))

View file

@ -306,7 +306,7 @@ there.")
"\\([^ ]+\\) +\\([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]+ ")