diff options
| author | Johan Bockgård | 2015-04-12 16:13:08 +0200 |
|---|---|---|
| committer | Johan Bockgård | 2015-04-12 16:13:08 +0200 |
| commit | f4dbec453dcf0586c2a7ac4b010ae12691bc215b (patch) | |
| tree | f0736733f8daf6d15a9bd47dc0a97812ccff89f9 | |
| parent | bda8469be55134d617f6a5409634758842fef15f (diff) | |
| download | emacs-f4dbec453dcf0586c2a7ac4b010ae12691bc215b.tar.gz emacs-f4dbec453dcf0586c2a7ac4b010ae12691bc215b.zip | |
(gnus-summary-refer-thread): Don't clobber unread articles
This fixes a bug where `A T' causes "random" articles to become marked
as read.
* lisp/gnus/gnus-sum.el (gnus-summary-refer-thread): Make sure
gnus-newsgroup-unreads remains sorted.
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index c68d4962636..73a0d4b1039 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -9068,22 +9068,24 @@ non-numeric or nil fetch the number specified by the | |||
| 9068 | (regexp-opt ',(append refs (list id subject))))))) | 9068 | (regexp-opt ',(append refs (list id subject))))))) |
| 9069 | (gnus-fetch-headers (list last) (if (numberp limit) | 9069 | (gnus-fetch-headers (list last) (if (numberp limit) |
| 9070 | (* 2 limit) limit) t)))) | 9070 | (* 2 limit) limit) t)))) |
| 9071 | article-ids) | 9071 | article-ids new-unreads) |
| 9072 | (when (listp new-headers) | 9072 | (when (listp new-headers) |
| 9073 | (dolist (header new-headers) | 9073 | (dolist (header new-headers) |
| 9074 | (push (mail-header-number header) article-ids) | 9074 | (push (mail-header-number header) article-ids)) |
| 9075 | (when (member (mail-header-number header) gnus-newsgroup-unselected) | 9075 | (setq article-ids (nreverse article-ids)) |
| 9076 | (push (mail-header-number header) gnus-newsgroup-unreads) | 9076 | (setq new-unreads |
| 9077 | (setq gnus-newsgroup-unselected | 9077 | (gnus-sorted-intersection gnus-newsgroup-unselected article-ids)) |
| 9078 | (delete (mail-header-number header) | 9078 | (setq gnus-newsgroup-unselected |
| 9079 | gnus-newsgroup-unselected)))) | 9079 | (gnus-sorted-ndifference gnus-newsgroup-unselected new-unreads)) |
| 9080 | (setq gnus-newsgroup-unreads | ||
| 9081 | (gnus-sorted-nunion gnus-newsgroup-unreads new-unreads)) | ||
| 9080 | (setq gnus-newsgroup-headers | 9082 | (setq gnus-newsgroup-headers |
| 9081 | (gnus-delete-duplicate-headers | 9083 | (gnus-delete-duplicate-headers |
| 9082 | (gnus-merge | 9084 | (gnus-merge |
| 9083 | 'list gnus-newsgroup-headers new-headers | 9085 | 'list gnus-newsgroup-headers new-headers |
| 9084 | 'gnus-article-sort-by-number))) | 9086 | 'gnus-article-sort-by-number))) |
| 9085 | (setq gnus-newsgroup-articles | 9087 | (setq gnus-newsgroup-articles |
| 9086 | (gnus-sorted-nunion gnus-newsgroup-articles (nreverse article-ids))) | 9088 | (gnus-sorted-nunion gnus-newsgroup-articles article-ids)) |
| 9087 | (gnus-summary-limit-include-thread id))) | 9089 | (gnus-summary-limit-include-thread id))) |
| 9088 | (gnus-summary-show-thread)) | 9090 | (gnus-summary-show-thread)) |
| 9089 | 9091 | ||