diff options
Diffstat (limited to 'lisp/gnus')
| -rw-r--r-- | lisp/gnus/gnus-art.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-demon.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-group.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-icalendar.el | 9 | ||||
| -rw-r--r-- | lisp/gnus/gnus-int.el | 3 | ||||
| -rw-r--r-- | lisp/gnus/gnus-score.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 14 | ||||
| -rw-r--r-- | lisp/gnus/mail-source.el | 6 | ||||
| -rw-r--r-- | lisp/gnus/nneething.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnheader.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 12 | ||||
| -rw-r--r-- | lisp/gnus/nnmail.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnmaildir.el | 4 |
13 files changed, 32 insertions, 32 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 0ea156118c6..06f7be3da7d 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -3610,7 +3610,7 @@ possible values." (defun article-lapsed-string (time &optional max-segments) ;; If the date is seriously mangled, the timezone functions are ;; liable to bug out, so we ignore all errors. - (let* ((real-time (time-subtract nil time)) + (let* ((real-time (time-since time)) (real-sec (float-time real-time)) (sec (abs real-sec)) (segments 0) diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el index b9cb8eb71ce..6c5e0b7f5d0 100644 --- a/lisp/gnus/gnus-demon.el +++ b/lisp/gnus/gnus-demon.el @@ -93,7 +93,7 @@ Emacs has been idle for IDLE `gnus-demon-timestep's." (defun gnus-demon-idle-since () "Return the number of seconds since when Emacs is idle." - (float-time (or (current-idle-time) '(0 0 0)))) + (float-time (or (current-idle-time) 0))) (defun gnus-demon-run-callback (func &optional idle time special) "Run FUNC if Emacs has been idle for longer than IDLE seconds. diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index cf8423b2db1..9f579bbd96c 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -4590,7 +4590,7 @@ or `gnus-group-catchup-group-hook'." ;; FIXME: This should return a Lisp integer, not a Lisp float, ;; since it is always an integer. (let* ((time (or (gnus-group-timestamp group) 0)) - (delta (time-subtract nil time))) + (delta (time-since time))) (float-time delta))) (defun gnus-group-timestamp-string (group) diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index a9d15f92262..062dd1b2917 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -413,13 +413,12 @@ Return nil for non-recurring EVENT." (end-time (format-time-string "%H:%M" end)) (end-at-midnight (string= end-time "00:00")) (start-end-date-diff - (/ (float-time (time-subtract - (org-time-string-to-time end-date) - (org-time-string-to-time start-date))) - 86400)) + (time-to-number-of-days (time-subtract + (org-time-string-to-time end-date) + (org-time-string-to-time start-date)))) (org-repeat (gnus-icalendar-event:org-repeat event)) (repeat (if org-repeat (concat " " org-repeat) "")) - (time-1-day '(0 86400))) + (time-1-day 86400)) ;; NOTE: special care is needed with appointments ending at midnight ;; (typically all-day events): the end time has to be changed to 23:59 to diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 477eb9c464a..e23e53b1ef5 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -257,7 +257,8 @@ If it is down, start it up (again)." (insert (format-time-string "%H:%M:%S") (format " %.2fs %s %S\n" (if (numberp gnus-backend-trace-elapsed) - (- (float-time) gnus-backend-trace-elapsed) + (float-time + (time-since gnus-backend-trace-elapsed)) 0) type form)) (setq gnus-backend-trace-elapsed (float-time))))) diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index f5fd4f300a8..6114fb5f4f5 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -1501,7 +1501,7 @@ If FORMAT, also format the current score file." (when (and gnus-summary-default-score scores) (let* ((entries gnus-header-index) - (now (time-to-days (current-time))) + (now (time-to-days nil)) (expire (and gnus-score-expiry-days (- now gnus-score-expiry-days))) (headers gnus-newsgroup-headers) @@ -2380,7 +2380,7 @@ score in `gnus-newsgroup-scored' by SCORE." (memq 'word gnus-newsgroup-adaptive)) (with-temp-buffer (let* ((hashtb (gnus-make-hashtable 1000)) - (date (time-to-days (current-time))) + (date (time-to-days nil)) (data gnus-newsgroup-data) word d score val) (with-syntax-table gnus-adaptive-word-syntax-table diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 3a5886a8636..efb3e4f1a66 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -3855,20 +3855,20 @@ 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 (float-time (gnus-date-get-time messy-date))) - (now (float-time)) + (let* ((messy-date (gnus-date-get-time messy-date)) + (now (current-time)) ;;If we don't find something suitable we'll use this one (my-format "%b %d '%y")) - (let* ((difference (- now messy-date)) + (let* ((difference (time-subtract now messy-date)) (templist gnus-user-date-format-alist) (top (eval (caar templist)))) - (while (if (numberp top) (< top difference) (not top)) + (while (if (numberp top) (time-less-p top difference) (not top)) (progn (setq templist (cdr templist)) (setq top (eval (caar templist))))) (if (stringp (cdr (car templist))) (setq my-format (cdr (car templist))))) - (format-time-string (eval my-format) (encode-time messy-date))) + (format-time-string (eval my-format) messy-date)) (error " ? "))) (defun gnus-summary-set-local-parameters (group) @@ -5093,8 +5093,8 @@ Unscored articles will be counted as having a score of zero." "Return the highest article date in THREAD." (apply 'max (mapcar (lambda (header) (float-time - (gnus-date-get-time - (mail-header-date header)))) + (gnus-date-get-time + (mail-header-date header)))) (flatten-tree thread)))) (defun gnus-thread-total-score-1 (root) diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index 5a389fae137..7514e64e7c2 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -647,9 +647,9 @@ 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) - (> (float-time - (time-since mail-source-incoming-last-checked-time)) - (* 24 60 60))) + (time-less-p + (* 24 60 60) + (time-since mail-source-incoming-last-checked-time))) (setq mail-source-incoming-last-checked-time (current-time)) (mail-source-delete-old-incoming mail-source-delete-incoming diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el index 885d6f2afcf..f64007aaf79 100644 --- a/lisp/gnus/nneething.el +++ b/lisp/gnus/nneething.el @@ -319,7 +319,7 @@ included.") "Subject: " (file-name-nondirectory file) (or extra-msg "") "\n" "Message-ID: <nneething-" (nneething-encode-file-name file) "@" (system-name) ">\n" - (if (zerop (float-time (file-attribute-modification-time atts))) "" + (if (time-equal-p 0 (file-attribute-modification-time atts)) "" (concat "Date: " (current-time-string (file-attribute-modification-time atts)) "\n")) diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 7c8673ee1c5..090b8420842 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -1075,7 +1075,7 @@ See `find-file-noselect' for the arguments." (defvar nnheader-last-message-time '(0 0)) (defun nnheader-message-maybe (&rest args) (let ((now (current-time))) - (when (> (float-time (time-subtract now nnheader-last-message-time)) 1) + (when (time-less-p 1 (time-subtract now nnheader-last-message-time)) (setq nnheader-last-message-time now) (apply 'nnheader-message args)))) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 9646bb51d08..ac1d28644f7 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -386,12 +386,12 @@ textual parts.") (with-current-buffer buffer (when (and nnimap-object (nnimap-last-command-time nnimap-object) - (> (float-time - (time-subtract - now - (nnimap-last-command-time nnimap-object))) - ;; More than five minutes since the last command. - (* 5 60))) + (time-less-p + ;; More than five minutes since the last command. + (* 5 60) + (time-subtract + now + (nnimap-last-command-time nnimap-object)))) (ignore-errors ;E.g. "buffer foo has no process". (nnimap-send-command "NOOP")))))))) diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index c2e84c47035..f6d75252930 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -1882,7 +1882,7 @@ If TIME is nil, then return the cutoff time for oldness instead." (setq days (days-to-time days)) ;; Compare the time with the current time. (if (null time) - (time-subtract nil days) + (time-since days) (ignore-errors (time-less-p days (time-since time))))))))) (declare-function gnus-group-mark-article-read "gnus-group" (group article)) diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index d7117a1ce20..5fabeac7e39 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -764,7 +764,7 @@ This variable is set by `nnmaildir-request-article'.") (defun nnmaildir--scan (gname scan-msgs groups _method srv-dir srv-ls) (catch 'return - (let ((36h-ago (- (float-time) 129600)) + (let ((36h-ago (time-since 129600)) absdir nndir tdir ndir cdir nattr cattr isnew pgname read-only ls files num dir flist group x) (setq absdir (nnmaildir--srvgrp-dir srv-dir gname) @@ -1577,7 +1577,7 @@ This variable is set by `nnmaildir-request-article'.") (when no-force (unless (integerp time) ;; handle 'never (throw 'return (gnus-uncompress-range ranges))) - (setq boundary (time-subtract nil time))) + (setq boundary (time-since time))) (setq dir (nnmaildir--srv-dir nnmaildir--cur-server) dir (nnmaildir--srvgrp-dir dir gname) dir (nnmaildir--cur dir) |
