diff options
| author | Lars Magne Ingebrigtsen | 2011-03-15 22:57:48 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2011-03-15 22:57:48 +0000 |
| commit | 4c7468f6446a25c4abbbacf495d45e30103f26b7 (patch) | |
| tree | 03781ccea68ec148280ea307ef8cf4fa3999b0a4 /lisp | |
| parent | 448e0f792ba882b1876d2715865c870e1d24d505 (diff) | |
| download | emacs-4c7468f6446a25c4abbbacf495d45e30103f26b7.tar.gz emacs-4c7468f6446a25c4abbbacf495d45e30103f26b7.zip | |
gnus-sum.el (gnus-articles-to-read): Revert back to old behaviour if we're selecting a group with unread articles.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/gnus/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 27 |
2 files changed, 21 insertions, 9 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 1b4cd186951..27fdc563db9 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-03-15 Lars Magne Ingebrigtsen <larsi@gnus.org> | 1 | 2011-03-15 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 2 | ||
| 3 | * gnus-sum.el (gnus-articles-to-read): Revert back to old behaviour if | ||
| 4 | we're selecting a group with unread articles. | ||
| 5 | |||
| 3 | * nnimap.el (nnimap-open-connection-1): Allow `network-only', too. | 6 | * nnimap.el (nnimap-open-connection-1): Allow `network-only', too. |
| 4 | 7 | ||
| 5 | * gssapi.el: New file separated out from imap.el to provide a general | 8 | * gssapi.el: New file separated out from imap.el to provide a general |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 0fa1d5979c7..385460378b1 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -5798,7 +5798,8 @@ If SELECT-ARTICLES, only select those articles from GROUP." | |||
| 5798 | 5798 | ||
| 5799 | (defun gnus-articles-to-read (group &optional read-all) | 5799 | (defun gnus-articles-to-read (group &optional read-all) |
| 5800 | "Find out what articles the user wants to read." | 5800 | "Find out what articles the user wants to read." |
| 5801 | (let* ((articles | 5801 | (let* ((only-read-p t) |
| 5802 | (articles | ||
| 5802 | ;; Select all articles if `read-all' is non-nil, or if there | 5803 | ;; Select all articles if `read-all' is non-nil, or if there |
| 5803 | ;; are no unread articles. | 5804 | ;; are no unread articles. |
| 5804 | (if (or read-all | 5805 | (if (or read-all |
| @@ -5822,6 +5823,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." | |||
| 5822 | (gnus-uncompress-range (gnus-active group))) | 5823 | (gnus-uncompress-range (gnus-active group))) |
| 5823 | (gnus-cache-articles-in-group group)) | 5824 | (gnus-cache-articles-in-group group)) |
| 5824 | ;; Select only the "normal" subset of articles. | 5825 | ;; Select only the "normal" subset of articles. |
| 5826 | (setq only-read-p nil) | ||
| 5825 | (gnus-sorted-nunion | 5827 | (gnus-sorted-nunion |
| 5826 | (gnus-sorted-union gnus-newsgroup-dormant gnus-newsgroup-marked) | 5828 | (gnus-sorted-union gnus-newsgroup-dormant gnus-newsgroup-marked) |
| 5827 | gnus-newsgroup-unreads))) | 5829 | gnus-newsgroup-unreads))) |
| @@ -5845,18 +5847,25 @@ If SELECT-ARTICLES, only select those articles from GROUP." | |||
| 5845 | (let* ((cursor-in-echo-area nil) | 5847 | (let* ((cursor-in-echo-area nil) |
| 5846 | (initial (gnus-parameter-large-newsgroup-initial | 5848 | (initial (gnus-parameter-large-newsgroup-initial |
| 5847 | gnus-newsgroup-name)) | 5849 | gnus-newsgroup-name)) |
| 5850 | (default (if only-read-p | ||
| 5851 | (or initial gnus-large-newsgroup) | ||
| 5852 | number)) | ||
| 5848 | (input | 5853 | (input |
| 5849 | (read-string | 5854 | (read-string |
| 5850 | (format | 5855 | (if only-read-p |
| 5851 | "How many articles from %s (available %d, default %d): " | 5856 | (format |
| 5852 | (gnus-group-decoded-name | 5857 | "How many articles from %s (available %d, default %d): " |
| 5853 | (gnus-group-real-name gnus-newsgroup-name)) | 5858 | (gnus-group-decoded-name |
| 5854 | number | 5859 | (gnus-group-real-name gnus-newsgroup-name)) |
| 5855 | (or initial gnus-large-newsgroup)) | 5860 | number default) |
| 5861 | (format | ||
| 5862 | "How many articles from %s (%d available): " | ||
| 5863 | (gnus-group-decoded-name | ||
| 5864 | (gnus-group-real-name gnus-newsgroup-name)) | ||
| 5865 | default)) | ||
| 5856 | nil | 5866 | nil |
| 5857 | nil | 5867 | nil |
| 5858 | (number-to-string | 5868 | (number-to-string default)))) |
| 5859 | (or initial gnus-large-newsgroup))))) | ||
| 5860 | (if (string-match "^[ \t]*$" input) number input))) | 5869 | (if (string-match "^[ \t]*$" input) number input))) |
| 5861 | ((and (> scored marked) (< scored number) | 5870 | ((and (> scored marked) (< scored number) |
| 5862 | (> (- scored number) 20)) | 5871 | (> (- scored number) 20)) |