[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6cb4992: Fix Gnus duplicate suppression guards (bug
From: |
Basil L. Contovounesios |
Subject: |
[Emacs-diffs] master 6cb4992: Fix Gnus duplicate suppression guards (bug#34987) |
Date: |
Tue, 9 Apr 2019 16:29:55 -0400 (EDT) |
branch: master
commit 6cb49922e63c2523ccdd6e0a6bd72bcfa72c50c6
Author: Basil L. Contovounesios <address@hidden>
Commit: Basil L. Contovounesios <address@hidden>
Fix Gnus duplicate suppression guards (bug#34987)
* lisp/gnus/gnus-dup.el (gnus-dup-enter-articles)
(gnus-dup-suppress-articles): Use gnus-dup-hashtb as an indicator of
initialization instead of gnus-dup-list, which may happen to be nil.
(gnus-dup-unsuppress-article): Do nothing if gnus-dup-hashtb is
uninitialized.
---
lisp/gnus/gnus-dup.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/gnus/gnus-dup.el b/lisp/gnus/gnus-dup.el
index 4902212..4981614 100644
--- a/lisp/gnus/gnus-dup.el
+++ b/lisp/gnus/gnus-dup.el
@@ -107,7 +107,7 @@ seen in the same session."
(defun gnus-dup-enter-articles ()
"Enter articles from the current group for future duplicate suppression."
- (unless gnus-dup-list
+ (unless gnus-dup-hashtb
(gnus-dup-open))
(setq gnus-dup-list-dirty t) ; mark list for saving
(let (msgid)
@@ -133,7 +133,7 @@ seen in the same session."
(defun gnus-dup-suppress-articles ()
"Mark duplicate articles as read."
- (unless gnus-dup-list
+ (unless gnus-dup-hashtb
(gnus-dup-open))
(gnus-message 8 "Suppressing duplicates...")
(let ((auto (and gnus-newsgroup-auto-expire
@@ -152,9 +152,10 @@ seen in the same session."
(defun gnus-dup-unsuppress-article (article)
"Stop suppression of ARTICLE."
- (let* ((header (gnus-data-header (gnus-data-find article)))
- (id (when header (mail-header-id header))))
- (when id
+ (let (header id)
+ (when (and gnus-dup-hashtb
+ (setq header (gnus-data-header (gnus-data-find article)))
+ (setq id (mail-header-id header)))
(setq gnus-dup-list-dirty t)
(setq gnus-dup-list (delete id gnus-dup-list))
(remhash id gnus-dup-hashtb))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 6cb4992: Fix Gnus duplicate suppression guards (bug#34987),
Basil L. Contovounesios <=