diff options
| author | Lars Ingebrigtsen | 2016-02-13 17:27:26 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-13 17:27:26 +1100 |
| commit | bfee9fab2f51a94db68247c6ee6eedebb7669209 (patch) | |
| tree | 7b425056bd649b2b18c91db953bc2a7a9e3c5762 | |
| parent | 2443e3801efe6b98d54f719e0b6527b6938e9988 (diff) | |
| download | emacs-bfee9fab2f51a94db68247c6ee6eedebb7669209.tar.gz emacs-bfee9fab2f51a94db68247c6ee6eedebb7669209.zip | |
Remove the gnus-float-time alias
* lisp/gnus/gnus-util.el (gnus-completion-styles): Remove
compat code.
(gnus-float-time): Remove.
| -rw-r--r-- | lisp/gnus/ecomplete.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/gnus-delay.el | 8 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 18 | ||||
| -rw-r--r-- | lisp/gnus/mail-source.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnspool.el | 2 |
7 files changed, 15 insertions, 31 deletions
diff --git a/lisp/gnus/ecomplete.el b/lisp/gnus/ecomplete.el index 76beb4005c4..cb50cce6056 100644 --- a/lisp/gnus/ecomplete.el +++ b/lisp/gnus/ecomplete.el | |||
| @@ -55,11 +55,7 @@ | |||
| 55 | 55 | ||
| 56 | (defun ecomplete-add-item (type key text) | 56 | (defun ecomplete-add-item (type key text) |
| 57 | (let ((elems (assq type ecomplete-database)) | 57 | (let ((elems (assq type ecomplete-database)) |
| 58 | (now (string-to-number | 58 | (now (string-to-number (format "%.0f" (float-time)))) |
| 59 | (format "%.0f" (if (featurep 'emacs) | ||
| 60 | (float-time) | ||
| 61 | (require 'gnus-util) | ||
| 62 | (gnus-float-time))))) | ||
| 63 | entry) | 59 | entry) |
| 64 | (unless elems | 60 | (unless elems |
| 65 | (push (setq elems (list type)) ecomplete-database)) | 61 | (push (setq elems (list type)) ecomplete-database)) |
diff --git a/lisp/gnus/gnus-delay.el b/lisp/gnus/gnus-delay.el index 93069e5e4e8..2f387fc336b 100644 --- a/lisp/gnus/gnus-delay.el +++ b/lisp/gnus/gnus-delay.el | |||
| @@ -103,10 +103,10 @@ DELAY is a string, giving the length of the time. Possible values are: | |||
| 103 | (aset deadline 1 minute) | 103 | (aset deadline 1 minute) |
| 104 | (aset deadline 2 hour) | 104 | (aset deadline 2 hour) |
| 105 | ;; Convert to seconds. | 105 | ;; Convert to seconds. |
| 106 | (setq deadline (gnus-float-time (apply 'encode-time | 106 | (setq deadline (float-time (apply 'encode-time |
| 107 | (append deadline nil)))) | 107 | (append deadline nil)))) |
| 108 | ;; If this time has passed already, add a day. | 108 | ;; If this time has passed already, add a day. |
| 109 | (when (< deadline (gnus-float-time)) | 109 | (when (< deadline (float-time)) |
| 110 | (setq deadline (+ 86400 deadline))) ; 86400 secs/day | 110 | (setq deadline (+ 86400 deadline))) ; 86400 secs/day |
| 111 | ;; Convert seconds to date header. | 111 | ;; Convert seconds to date header. |
| 112 | (setq deadline (message-make-date | 112 | (setq deadline (message-make-date |
| @@ -129,7 +129,7 @@ DELAY is a string, giving the length of the time. Possible values are: | |||
| 129 | (t | 129 | (t |
| 130 | (setq delay (* num 60)))) | 130 | (setq delay (* num 60)))) |
| 131 | (setq deadline (message-make-date | 131 | (setq deadline (message-make-date |
| 132 | (seconds-to-time (+ (gnus-float-time) delay))))) | 132 | (seconds-to-time (+ (float-time) delay))))) |
| 133 | (t (error "Malformed delay `%s'" delay))) | 133 | (t (error "Malformed delay `%s'" delay))) |
| 134 | (message-add-header (format "%s: %s" gnus-delay-header deadline))) | 134 | (message-add-header (format "%s: %s" gnus-delay-header deadline))) |
| 135 | (set-buffer-modified-p t) | 135 | (set-buffer-modified-p t) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 89a5ca2af72..5fb566e8886 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -3848,8 +3848,8 @@ respectively." | |||
| 3848 | Returns \" ? \" if there's bad input or if another error occurs. | 3848 | Returns \" ? \" if there's bad input or if another error occurs. |
| 3849 | Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"." | 3849 | Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"." |
| 3850 | (condition-case () | 3850 | (condition-case () |
| 3851 | (let* ((messy-date (gnus-float-time (gnus-date-get-time messy-date))) | 3851 | (let* ((messy-date (float-time (gnus-date-get-time messy-date))) |
| 3852 | (now (gnus-float-time)) | 3852 | (now (float-time)) |
| 3853 | ;;If we don't find something suitable we'll use this one | 3853 | ;;If we don't find something suitable we'll use this one |
| 3854 | (my-format "%b %d '%y")) | 3854 | (my-format "%b %d '%y")) |
| 3855 | (let* ((difference (- now messy-date)) | 3855 | (let* ((difference (- now messy-date)) |
| @@ -5061,7 +5061,7 @@ Unscored articles will be counted as having a score of zero." | |||
| 5061 | (defun gnus-thread-latest-date (thread) | 5061 | (defun gnus-thread-latest-date (thread) |
| 5062 | "Return the highest article date in THREAD." | 5062 | "Return the highest article date in THREAD." |
| 5063 | (apply 'max | 5063 | (apply 'max |
| 5064 | (mapcar (lambda (header) (gnus-float-time | 5064 | (mapcar (lambda (header) (float-time |
| 5065 | (gnus-date-get-time | 5065 | (gnus-date-get-time |
| 5066 | (mail-header-date header)))) | 5066 | (mail-header-date header)))) |
| 5067 | (message-flatten-list thread)))) | 5067 | (message-flatten-list thread)))) |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 6ca0de3cf54..23a16763202 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -52,13 +52,10 @@ | |||
| 52 | gnus-iswitchb-completing-read))) | 52 | gnus-iswitchb-completing-read))) |
| 53 | 53 | ||
| 54 | (defcustom gnus-completion-styles | 54 | (defcustom gnus-completion-styles |
| 55 | (if (and (boundp 'completion-styles-alist) | 55 | (append (when (and (assq 'substring completion-styles-alist) |
| 56 | (boundp 'completion-styles)) | 56 | (not (memq 'substring completion-styles))) |
| 57 | (append (when (and (assq 'substring completion-styles-alist) | 57 | (list 'substring)) |
| 58 | (not (memq 'substring completion-styles))) | 58 | completion-styles) |
| 59 | (list 'substring)) | ||
| 60 | completion-styles) | ||
| 61 | nil) | ||
| 62 | "Value of `completion-styles' to use when completing." | 59 | "Value of `completion-styles' to use when completing." |
| 63 | :version "24.1" | 60 | :version "24.1" |
| 64 | :group 'gnus-meta | 61 | :group 'gnus-meta |
| @@ -291,13 +288,6 @@ Symbols are also allowed; their print names are used instead." | |||
| 291 | (and (= (car fdate) (car date)) | 288 | (and (= (car fdate) (car date)) |
| 292 | (> (nth 1 fdate) (nth 1 date)))))) | 289 | (> (nth 1 fdate) (nth 1 date)))))) |
| 293 | 290 | ||
| 294 | ;; Every version of Emacs Gnus supports has built-in float-time. | ||
| 295 | ;; The featurep test silences an irritating compiler warning. | ||
| 296 | (defalias 'gnus-float-time | ||
| 297 | (if (or (featurep 'emacs) | ||
| 298 | (fboundp 'float-time)) | ||
| 299 | 'float-time 'time-to-seconds)) | ||
| 300 | |||
| 301 | ;;; Keymap macros. | 291 | ;;; Keymap macros. |
| 302 | 292 | ||
| 303 | (defmacro gnus-local-set-keys (&rest plist) | 293 | (defmacro gnus-local-set-keys (&rest plist) |
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index 2388a1afa57..21398d18684 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el | |||
| @@ -629,8 +629,6 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile) | |||
| 629 | 0) | 629 | 0) |
| 630 | (funcall callback mail-source-crash-box info))) | 630 | (funcall callback mail-source-crash-box info))) |
| 631 | 631 | ||
| 632 | (autoload 'gnus-float-time "gnus-util") | ||
| 633 | |||
| 634 | (defvar mail-source-incoming-last-checked-time nil) | 632 | (defvar mail-source-incoming-last-checked-time nil) |
| 635 | 633 | ||
| 636 | (defun mail-source-delete-crash-box () | 634 | (defun mail-source-delete-crash-box () |
| @@ -651,7 +649,7 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile) | |||
| 651 | ;; Don't check for old incoming files more than once per day to | 649 | ;; Don't check for old incoming files more than once per day to |
| 652 | ;; save a lot of file accesses. | 650 | ;; save a lot of file accesses. |
| 653 | (when (or (null mail-source-incoming-last-checked-time) | 651 | (when (or (null mail-source-incoming-last-checked-time) |
| 654 | (> (gnus-float-time | 652 | (> (float-time |
| 655 | (time-since mail-source-incoming-last-checked-time)) | 653 | (time-since mail-source-incoming-last-checked-time)) |
| 656 | (* 24 60 60))) | 654 | (* 24 60 60))) |
| 657 | (setq mail-source-incoming-last-checked-time (current-time)) | 655 | (setq mail-source-incoming-last-checked-time (current-time)) |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index c6f54da1211..eefe1a140b7 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -365,7 +365,7 @@ textual parts.") | |||
| 365 | (with-current-buffer buffer | 365 | (with-current-buffer buffer |
| 366 | (when (and nnimap-object | 366 | (when (and nnimap-object |
| 367 | (nnimap-last-command-time nnimap-object) | 367 | (nnimap-last-command-time nnimap-object) |
| 368 | (> (gnus-float-time | 368 | (> (float-time |
| 369 | (time-subtract | 369 | (time-subtract |
| 370 | now | 370 | now |
| 371 | (nnimap-last-command-time nnimap-object))) | 371 | (nnimap-last-command-time nnimap-object))) |
diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el index 07624f230f3..9db68b15df2 100644 --- a/lisp/gnus/nnspool.el +++ b/lisp/gnus/nnspool.el | |||
| @@ -306,7 +306,7 @@ there.") | |||
| 306 | "\\([^ ]+\\) +\\([0-9]+\\)[0-9][0-9][0-9] ")) | 306 | "\\([^ ]+\\) +\\([0-9]+\\)[0-9][0-9][0-9] ")) |
| 307 | (zerop (forward-line -1)))) | 307 | (zerop (forward-line -1)))) |
| 308 | ;; We require nnheader which requires gnus-util. | 308 | ;; We require nnheader which requires gnus-util. |
| 309 | (let ((seconds (gnus-float-time (date-to-time date))) | 309 | (let ((seconds (float-time (date-to-time date))) |
| 310 | groups) | 310 | groups) |
| 311 | ;; Go through lines and add the latest groups to a list. | 311 | ;; Go through lines and add the latest groups to a list. |
| 312 | (while (and (looking-at "\\([^ ]+\\) +[0-9]+ ") | 312 | (while (and (looking-at "\\([^ ]+\\) +[0-9]+ ") |