summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-score.el
diff options
context:
space:
mode:
authorAlex Bochannek <alex@bochannek.com>2020-09-10 15:16:04 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-09-10 15:16:04 +0200
commit6c46dddcb25c959836d4b7ab1d6f174db5dff4b2 (patch)
treefb11511133cc2ff41b8da99d5cf1a99cf9682a71 /lisp/gnus/gnus-score.el
parentc033bb8648dc6fc14c96925710d662dbcd214cc7 (diff)
downloademacs-6c46dddcb25c959836d4b7ab1d6f174db5dff4b2.tar.gz
emacs-6c46dddcb25c959836d4b7ab1d6f174db5dff4b2.tar.bz2
emacs-6c46dddcb25c959836d4b7ab1d6f174db5dff4b2.zip
Fix up < and > "date" scoring rules in Gnus
* lisp/gnus/gnus-score.el (gnus-score-date): The previous < and > "date" scoring rules (added in the previous patch) had reversed logic (bug#43270). Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/gnus/gnus-score.el')
-rw-r--r--lisp/gnus/gnus-score.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index c5156a195a3..6a0e8ceb998 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -1695,9 +1695,10 @@ score in `gnus-newsgroup-scored' by SCORE."
match (gnus-date-iso8601 (nth 0 kill))))
((eq type '<)
(setq type 'after
- match-func 'gnus-string>
+ match-func 'string<
match (gnus-time-iso8601
- (time-add (current-time) (* 86400 (nth 0 kill))))))
+ (time-subtract (current-time)
+ (* 86400 (nth 0 kill))))))
((eq type 'before)
(setq match-func 'gnus-string>
match (gnus-date-iso8601 (nth 0 kill))))
@@ -1705,7 +1706,8 @@ score in `gnus-newsgroup-scored' by SCORE."
(setq type 'before
match-func 'gnus-string>
match (gnus-time-iso8601
- (time-add (current-time) (* -86400 (nth 0 kill))))))
+ (time-subtract (current-time)
+ (* 86400 (nth 0 kill))))))
((eq type 'at)
(setq match-func 'string=
match (gnus-date-iso8601 (nth 0 kill))))