aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBasil L. Contovounesios2019-03-24 14:12:58 +0000
committerEric Abrahamsen2019-03-24 10:11:29 -0700
commit03e916beb0186f3707cd238650298870bf471575 (patch)
treeff3dab09aecbde6e12fccfa57151939c5e3126df
parentd2a9273c77182e8aa3468fbb5c71f2729639c465 (diff)
downloademacs-03e916beb0186f3707cd238650298870bf471575.tar.gz
emacs-03e916beb0186f3707cd238650298870bf471575.zip
Fix Gnus duplicate article unsuppression
* lisp/gnus/gnus-sum.el (gnus-summary-mode-group): Declare before first use to silence byte-compiler. (gnus-summary-select-article): Simplify boolean expression. (gnus-summary-move-article): Do not try to unsuppress article when duplicate suppression is disabled. (bug#34973, bug#34974)
-rw-r--r--lisp/gnus/gnus-sum.el25
1 files changed, 12 insertions, 13 deletions
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 85c902a5e43..f09c0fbb58e 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3053,6 +3053,11 @@ When FORCE, rebuild the tool bar."
3053 3053
3054(defvar bidi-paragraph-direction) 3054(defvar bidi-paragraph-direction)
3055 3055
3056(defvar gnus-summary-mode-group nil
3057 "Variable for communication with `gnus-summary-mode'.
3058Allows the `gnus-newsgroup-name' local variable to be set before
3059the summary mode hooks are run.")
3060
3056(define-derived-mode gnus-summary-mode gnus-mode "Summary" 3061(define-derived-mode gnus-summary-mode gnus-mode "Summary"
3057 "Major mode for reading articles. 3062 "Major mode for reading articles.
3058\\<gnus-summary-mode-map> 3063\\<gnus-summary-mode-map>
@@ -3468,11 +3473,6 @@ display only a single character."
3468 (point) 3473 (point)
3469 (current-buffer)))))) 3474 (current-buffer))))))
3470 3475
3471(defvar gnus-summary-mode-group nil
3472 "Variable for communication with `gnus-summary-mode'.
3473Allows the `gnus-newsgroup-name' local variable to be set before
3474the summary mode hooks are run.")
3475
3476(defun gnus-summary-setup-buffer (group) 3476(defun gnus-summary-setup-buffer (group)
3477 "Initialize summary buffer for GROUP. 3477 "Initialize summary buffer for GROUP.
3478This function does all setup work that relies on the specific 3478This function does all setup work that relies on the specific
@@ -7744,7 +7744,7 @@ be displayed."
7744 (unless (derived-mode-p 'gnus-summary-mode) 7744 (unless (derived-mode-p 'gnus-summary-mode)
7745 (set-buffer gnus-summary-buffer)) 7745 (set-buffer gnus-summary-buffer))
7746 (let ((article (or article (gnus-summary-article-number))) 7746 (let ((article (or article (gnus-summary-article-number)))
7747 (all-headers (not (not all-headers))) ;Must be t or nil. 7747 (all-headers (and all-headers t)) ; Must be t or nil.
7748 gnus-summary-display-article-function) 7748 gnus-summary-display-article-function)
7749 (and (not pseudo) 7749 (and (not pseudo)
7750 (gnus-summary-article-pseudo-p article) 7750 (gnus-summary-article-pseudo-p article)
@@ -9978,13 +9978,12 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
9978 (crosspost "Crosspost" "Crossposting"))) 9978 (crosspost "Crosspost" "Crossposting")))
9979 (copy-buf (save-excursion 9979 (copy-buf (save-excursion
9980 (nnheader-set-temp-buffer " *copy article*"))) 9980 (nnheader-set-temp-buffer " *copy article*")))
9981 art-group to-method new-xref article to-groups 9981 art-group to-method new-xref to-groups
9982 articles-to-update-marks encoded) 9982 articles-to-update-marks encoded)
9983 (unless (assq action names) 9983 (unless (assq action names)
9984 (error "Unknown action %s" action)) 9984 (error "Unknown action %s" action))
9985 ;; Read the newsgroup name. 9985 ;; Read the newsgroup name.
9986 (when (and (not to-newsgroup) 9986 (unless (or to-newsgroup select-method)
9987 (not select-method))
9988 (if (and gnus-move-split-methods 9987 (if (and gnus-move-split-methods
9989 (not 9988 (not
9990 (and (memq gnus-current-article articles) 9989 (and (memq gnus-current-article articles)
@@ -10029,8 +10028,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
10029 (or (car select-method) 10028 (or (car select-method)
10030 (gnus-group-decoded-name to-newsgroup)) 10029 (gnus-group-decoded-name to-newsgroup))
10031 articles) 10030 articles)
10032 (while articles 10031 (dolist (article articles)
10033 (setq article (pop articles))
10034 ;; Set any marks that may have changed in the summary buffer. 10032 ;; Set any marks that may have changed in the summary buffer.
10035 (when gnus-preserve-marks 10033 (when gnus-preserve-marks
10036 (gnus-summary-push-marks-to-backend article)) 10034 (gnus-summary-push-marks-to-backend article))
@@ -10039,8 +10037,9 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
10039 (cond 10037 (cond
10040 ;; Move the article. 10038 ;; Move the article.
10041 ((eq action 'move) 10039 ((eq action 'move)
10042 ;; Remove this article from future suppression. 10040 (when gnus-suppress-duplicates
10043 (gnus-dup-unsuppress-article article) 10041 ;; Remove this article from future suppression.
10042 (gnus-dup-unsuppress-article article))
10044 (let* ((from-method (gnus-find-method-for-group 10043 (let* ((from-method (gnus-find-method-for-group
10045 gnus-newsgroup-name)) 10044 gnus-newsgroup-name))
10046 (to-method (or select-method 10045 (to-method (or select-method