mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-02 08:22:22 +00:00
nndiary.el: fix dodgy schedule code
* lisp/gnus/nndiary.el (nndiary-last-occurrence): Don't sort a list and throw away the result because that leaves the list variable in an undefined state. Just take the largest element because that was obviously what the author meant.
This commit is contained in:
parent
5dab172a17
commit
fb66e4d58b
@ -1373,10 +1373,10 @@ all. This may very well take some time.")
|
||||
(setq day (+ 7 day))))
|
||||
;; Finally, if we have some days, they are valid
|
||||
(when days
|
||||
(sort days #'>)
|
||||
(throw 'found
|
||||
(encode-time 0 minute hour
|
||||
(car days) month year time-zone)))
|
||||
(apply #'max days)
|
||||
month year time-zone)))
|
||||
)))))
|
||||
;; There's an upper limit, but we didn't find any last occurrence.
|
||||
;; This means that the schedule is undecidable. This can happen if
|
||||
|
Loading…
Reference in New Issue
Block a user