diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-10 23:47:43 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-02-10 23:54:34 -0800 |
commit | 57c74793c46c6533b63836f00aecaf3ac2accb6d (patch) | |
tree | 5ceb3f9e765c4240069f92653d1648ca1137887c /lisp/gnus | |
parent | 54b9ee77adca44299fe8f4342498a082608b4d1b (diff) | |
download | emacs-57c74793c46c6533b63836f00aecaf3ac2accb6d.tar.gz |
Prefer encode-time to its alias
* lisp/calendar/icalendar.el, lisp/calendar/timeclock.el:
* lisp/emacs-lisp/timer.el, lisp/gnus/gnus-delay.el:
* lisp/gnus/gnus-sum.el, lisp/gnus/nndiary.el:
* lisp/gnus/nnrss.el, lisp/net/newst-backend.el:
* lisp/net/rcirc.el, lisp/obsolete/xesam.el:
* lisp/org/org-agenda.el, lisp/org/org-clock.el:
* lisp/org/org-element.el, lisp/org/org-timer.el:
* lisp/org/org.el, lisp/progmodes/flymake.el:
* lisp/url/url-cache.el, lisp/url/url-cookie.el:
Use encode-time instead of its alias seconds-to-time.
Diffstat (limited to 'lisp/gnus')
-rw-r--r-- | lisp/gnus/gnus-delay.el | 4 | ||||
-rw-r--r-- | lisp/gnus/gnus-sum.el | 2 | ||||
-rw-r--r-- | lisp/gnus/nndiary.el | 12 | ||||
-rw-r--r-- | lisp/gnus/nnrss.el | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/lisp/gnus/gnus-delay.el b/lisp/gnus/gnus-delay.el index d1ff7e6116d..e013f26adf2 100644 --- a/lisp/gnus/gnus-delay.el +++ b/lisp/gnus/gnus-delay.el @@ -110,7 +110,7 @@ DELAY is a string, giving the length of the time. Possible values are: (setq deadline (+ 86400 deadline))) ; 86400 secs/day ;; Convert seconds to date header. (setq deadline (message-make-date - (seconds-to-time deadline)))) + (encode-time deadline)))) ((string-match "\\([0-9]+\\)\\s-*\\([mhdwMY]\\)" delay) (setq num (match-string 1 delay)) (setq unit (match-string 2 delay)) @@ -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 (+ (float-time) delay))))) + (encode-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) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 911bf89f237..3a5886a8636 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -3868,7 +3868,7 @@ Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"." (setq top (eval (caar templist))))) (if (stringp (cdr (car templist))) (setq my-format (cdr (car templist))))) - (format-time-string (eval my-format) (seconds-to-time messy-date))) + (format-time-string (eval my-format) (encode-time messy-date))) (error " ? "))) (defun gnus-summary-set-local-parameters (group) diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index c65f78d3087..3798be10582 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -1279,27 +1279,27 @@ all. This may very well take some time.") (cond ((eq (cdr reminder) 'minute) (time-subtract (apply 'encode-time 0 (nthcdr 1 date-elts)) - (seconds-to-time (* (car reminder) 60.0)))) + (encode-time (* (car reminder) 60.0)))) ((eq (cdr reminder) 'hour) (time-subtract (apply 'encode-time 0 0 (nthcdr 2 date-elts)) - (seconds-to-time (* (car reminder) 3600.0)))) + (encode-time (* (car reminder) 3600.0)))) ((eq (cdr reminder) 'day) (time-subtract (apply 'encode-time 0 0 0 (nthcdr 3 date-elts)) - (seconds-to-time (* (car reminder) 86400.0)))) + (encode-time (* (car reminder) 86400.0)))) ((eq (cdr reminder) 'week) (time-subtract (apply 'encode-time 0 0 0 monday (nthcdr 4 date-elts)) - (seconds-to-time (* (car reminder) 604800.0)))) + (encode-time (* (car reminder) 604800.0)))) ((eq (cdr reminder) 'month) (time-subtract (apply 'encode-time 0 0 0 1 (nthcdr 4 date-elts)) - (seconds-to-time (* (car reminder) 18748800.0)))) + (encode-time (* (car reminder) 18748800.0)))) ((eq (cdr reminder) 'year) (time-subtract (apply 'encode-time 0 0 0 1 1 (nthcdr 5 date-elts)) - (seconds-to-time (* (car reminder) 400861056.0))))) + (encode-time (* (car reminder) 400861056.0))))) res)) (sort res 'time-less-p))) diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index db37e24b903..6a475966641 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -454,7 +454,7 @@ which RSS 2.0 allows." (cond ((null date)) ; do nothing for this case ;; if the date is just digits (unix time stamp): ((string-match "^[0-9]+$" date) - (setq given (seconds-to-time (string-to-number date)))) + (setq given (encode-time (string-to-number date)))) ;; RFC822 ((string-match " [0-9]+ " date) (setq vector (timezone-parse-date date) |