From a51863f73d914dbabbadb396cda2c9d360866277 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 1 Aug 2022 00:38:33 -0700 Subject: Simplify a few timestamps * lisp/calendar/time-date.el (safe-date-to-time): * lisp/calendar/timeclock.el (timeclock-generate-report): * lisp/epg.el (epg--start): * lisp/gnus/gnus-demon.el (gnus-demon-nntp-close-connection): * lisp/gnus/gnus-util.el (gnus-date-get-time): * lisp/gnus/nnheader.el (nnheader-last-message-time): * lisp/gnus/nnrss.el (nnrss-request-expire-articles): * lisp/vc/ediff-util.el (ediff-command-begin-time) (ediff-calc-command-time, ediff-profile): Prefer an integer like 0 to a timestamp list like (0 0) where either will do. --- lisp/gnus/gnus-demon.el | 2 +- lisp/gnus/gnus-util.el | 2 +- lisp/gnus/nnheader.el | 2 +- lisp/gnus/nnrss.el | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lisp/gnus') diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el index d9da8529ebe..f6cfd727f78 100644 --- a/lisp/gnus/gnus-demon.el +++ b/lisp/gnus/gnus-demon.el @@ -222,7 +222,7 @@ minutes, the connection is closed." (defun gnus-demon-nntp-close-connection () (save-window-excursion - (when (time-less-p '(0 300) (time-since nntp-last-command-time)) + (when (time-less-p 300 (time-since nntp-last-command-time)) (nntp-close-server)))) (defun gnus-demon-add-scanmail () diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index dda2b4ff5fc..ea11642cf41 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -383,7 +383,7 @@ Cache the result as a text property stored in DATE." ;; Either return the cached value... `(let ((d ,date)) (if (equal "" d) - '(0 0) + 0 (or (get-text-property 0 'gnus-time d) ;; or compute the value... (let ((time (safe-date-to-time d))) diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index ab57bd7eedd..92df41ea829 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -1055,7 +1055,7 @@ See `find-file-noselect' for the arguments." (or ,end (point-max))) '(buffer-string))))) -(defvar nnheader-last-message-time '(0 0)) +(defvar nnheader-last-message-time 0) (defun nnheader-message-maybe (&rest args) (let ((now (current-time))) (when (time-less-p 1 (time-subtract now nnheader-last-message-time)) diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index f740af3b6d1..5047be1a6a5 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -325,7 +325,7 @@ for decoding when the cdr that the data specify is not available.") (nnmail-expired-article-p group (if (listp (setq days (nth 1 e))) days - (days-to-time (- days (time-to-days '(0 0))))) + (days-to-time (- days (time-to-days 0)))) force)) (setq nnrss-group-data (delq e nnrss-group-data) changed t) -- cgit v1.2.3