summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/gnus-art.el2
-rw-r--r--lisp/gnus/gnus-delay.el22
-rw-r--r--lisp/gnus/gnus-icalendar.el2
-rw-r--r--lisp/gnus/gnus-logic.el6
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/gnus/nndiary.el12
6 files changed, 20 insertions, 26 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index e39011837a1..191f623afa3 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -3544,7 +3544,7 @@ possible values."
(substring
(message-make-date
(let* ((e (parse-time-string date))
- (tm (apply 'encode-time e))
+ (tm (encode-time e))
(ms (car tm))
(ls (- (cadr tm) (car (current-time-zone time)))))
(cond ((< ls 0) (list (1- ms) (+ ls 65536)))
diff --git a/lisp/gnus/gnus-delay.el b/lisp/gnus/gnus-delay.el
index e013f26adf2..aabf23924a0 100644
--- a/lisp/gnus/gnus-delay.el
+++ b/lisp/gnus/gnus-delay.el
@@ -98,19 +98,15 @@ DELAY is a string, giving the length of the time. Possible values are:
(setq hour (string-to-number (match-string 1 delay))
minute (string-to-number (match-string 2 delay)))
;; Use current time, except...
- (setq deadline (apply 'vector (decode-time)))
+ (setq deadline (decode-time))
;; ... for minute and hour.
- (aset deadline 1 minute)
- (aset deadline 2 hour)
- ;; Convert to seconds.
- (setq deadline (float-time (apply 'encode-time
- (append deadline nil))))
+ (setq deadline (apply #'encode-time (car deadline) minute hour
+ (nthcdr 3 deadline)))
;; If this time has passed already, add a day.
- (when (< deadline (float-time))
- (setq deadline (+ 86400 deadline))) ; 86400 secs/day
+ (when (time-less-p deadline nil)
+ (setq deadline (time-add 86400 deadline))) ; 86400 secs/day
;; Convert seconds to date header.
- (setq deadline (message-make-date
- (encode-time deadline))))
+ (setq deadline (message-make-date deadline)))
((string-match "\\([0-9]+\\)\\s-*\\([mhdwMY]\\)" delay)
(setq num (match-string 1 delay))
(setq unit (match-string 2 delay))
@@ -128,8 +124,7 @@ DELAY is a string, giving the length of the time. Possible values are:
(setq delay (* num 60 60)))
(t
(setq delay (* num 60))))
- (setq deadline (message-make-date
- (encode-time (+ (float-time) delay)))))
+ (setq deadline (message-make-date (time-add nil delay))))
(t (error "Malformed delay `%s'" delay)))
(message-add-header (format "%s: %s" gnus-delay-header deadline)))
(set-buffer-modified-p t)
@@ -164,8 +159,7 @@ DELAY is a string, giving the length of the time. Possible values are:
nil t)
(progn
(setq deadline (nnheader-header-value))
- (setq deadline (apply 'encode-time
- (parse-time-string deadline)))
+ (setq deadline (encode-time (parse-time-string deadline)))
(unless (time-less-p nil deadline)
(message "Sending delayed article %d" article)
(gnus-draft-send article group)
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el
index e39561edb33..06f09271647 100644
--- a/lisp/gnus/gnus-icalendar.el
+++ b/lisp/gnus/gnus-icalendar.el
@@ -147,7 +147,7 @@
(icalendar--get-event-property-attributes
event field) zone-map))
(dtdate-dec (icalendar--decode-isodatetime dtdate nil dtdate-zone)))
- (apply 'encode-time dtdate-dec)))
+ (encode-time dtdate-dec)))
(defun gnus-icalendar-event--find-attendee (ical name-or-email)
(let* ((event (car (icalendar--all-events ical)))
diff --git a/lisp/gnus/gnus-logic.el b/lisp/gnus/gnus-logic.el
index 8bf15cfd5b3..90f74205209 100644
--- a/lisp/gnus/gnus-logic.el
+++ b/lisp/gnus/gnus-logic.el
@@ -162,9 +162,9 @@
(funcall type (or (aref gnus-advanced-headers index) 0) match)))
(defun gnus-advanced-date (index match type)
- (let ((date (apply 'encode-time (parse-time-string
- (aref gnus-advanced-headers index))))
- (match (apply 'encode-time (parse-time-string match))))
+ (let ((date (encode-time (parse-time-string
+ (aref gnus-advanced-headers index))))
+ (match (encode-time (parse-time-string match))))
(cond
((eq type 'at)
(equal date match))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 9d5445c18cc..b0674525a86 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -5542,7 +5542,7 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'."
(let* ((cur (decode-time))
(nday (+ days (nth 3 cur))))
(setf (nth 3 cur) nday)
- (message-make-date (apply 'encode-time cur))))
+ (message-make-date (encode-time cur))))
(defun message-make-message-id ()
"Make a unique Message-ID."
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el
index 3798be10582..c8b7eed9870 100644
--- a/lisp/gnus/nndiary.el
+++ b/lisp/gnus/nndiary.el
@@ -1278,27 +1278,27 @@ all. This may very well take some time.")
(push
(cond ((eq (cdr reminder) 'minute)
(time-subtract
- (apply 'encode-time 0 (nthcdr 1 date-elts))
+ (apply #'encode-time 0 (nthcdr 1 date-elts))
(encode-time (* (car reminder) 60.0))))
((eq (cdr reminder) 'hour)
(time-subtract
- (apply 'encode-time 0 0 (nthcdr 2 date-elts))
+ (apply #'encode-time 0 0 (nthcdr 2 date-elts))
(encode-time (* (car reminder) 3600.0))))
((eq (cdr reminder) 'day)
(time-subtract
- (apply 'encode-time 0 0 0 (nthcdr 3 date-elts))
+ (apply #'encode-time 0 0 0 (nthcdr 3 date-elts))
(encode-time (* (car reminder) 86400.0))))
((eq (cdr reminder) 'week)
(time-subtract
- (apply 'encode-time 0 0 0 monday (nthcdr 4 date-elts))
+ (apply #'encode-time 0 0 0 monday (nthcdr 4 date-elts))
(encode-time (* (car reminder) 604800.0))))
((eq (cdr reminder) 'month)
(time-subtract
- (apply 'encode-time 0 0 0 1 (nthcdr 4 date-elts))
+ (apply #'encode-time 0 0 0 1 (nthcdr 4 date-elts))
(encode-time (* (car reminder) 18748800.0))))
((eq (cdr reminder) 'year)
(time-subtract
- (apply 'encode-time 0 0 0 1 1 (nthcdr 5 date-elts))
+ (apply #'encode-time 0 0 0 1 1 (nthcdr 5 date-elts))
(encode-time (* (car reminder) 400861056.0)))))
res))
(sort res 'time-less-p)))