From: yamaoka Date: Tue, 11 Feb 2003 22:22:02 +0000 (+0000) Subject: Synch to Oort Gnus. X-Git-Tag: t-gnus-6_15_17-00-quimby~73 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=2cf236e47de1d45cf28f00e9e3c025980ea8b34e;p=elisp%2Fgnus.git- Synch to Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 72aa5c8..6b4e7dc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2002-02-11 Kevin Greiner + + * gnus-agent.el (gnus-summary-set-agent-mark): Added call to + gnus-summary-goto-subject as gnus-summary-update-mark operates on + the current LINE. + (gnus-agent-summary-fetch-group): Minimized the number of times + that the article is updated in the buffer. + +2003-02-11 Teodor Zlatanov + + * spam.el (spam-ham-move-routine): use the process-mark instead of + gnus-current-article when moving articles + (spam-mark-spam-as-expired-and-move-routine): ditto, use the process-mark + 2003-02-11 Lars Magne Ingebrigtsen * gnus-topic.el (gnus-topic-expire-articles): Recursive. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 5f5ad61..e6060fd 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -66,8 +66,7 @@ (defcustom gnus-agent-expire-days 7 "Read articles older than this will be expired. This can also be a list of regexp/day pairs. The regexps will be -matched against group names. If nil, articles in the agent cache are -never expired." +matched against group names." :group 'gnus-agent :type '(choice (number :tag "days") (sexp :tag "List" nil))) @@ -749,18 +748,19 @@ article's mark is toggled." t) (t (memq article gnus-newsgroup-downloadable))))) - (gnus-summary-update-mark - (if unmark - (progn - (setq gnus-newsgroup-downloadable - (delq article gnus-newsgroup-downloadable)) - (gnus-article-mark article)) - (progn - (setq gnus-newsgroup-downloadable - (gnus-add-to-sorted-list gnus-newsgroup-downloadable article)) - gnus-downloadable-mark) - ) - 'unread))) + (when (gnus-summary-goto-subject article nil t) + (gnus-summary-update-mark + (if unmark + (progn + (setq gnus-newsgroup-downloadable + (delq article gnus-newsgroup-downloadable)) + (gnus-article-mark article)) + (progn + (setq gnus-newsgroup-downloadable + (gnus-add-to-sorted-list gnus-newsgroup-downloadable article)) + gnus-downloadable-mark) + ) + 'unread)))) (defun gnus-agent-get-undownloaded-list () "Construct list of articles that have not been downloaded." @@ -868,14 +868,30 @@ Optional arg ALL, if non-nil, means to fetch all articles." (gnus-agent-fetch-articles gnus-newsgroup-name articles))))) (save-excursion - (dolist (article articles) - (setq gnus-newsgroup-downloadable - (delq article gnus-newsgroup-downloadable)) - (if gnus-agent-mark-unread-after-downloaded - (gnus-summary-mark-article article gnus-unread-mark)) - (when (gnus-summary-goto-subject article nil t) - (gnus-summary-update-download-mark article))))) + (let ((was-marked-downloadable + (memq article gnus-newsgroup-downloadable))) + (when + (cond + (gnus-agent-mark-unread-after-downloaded + (setq gnus-newsgroup-downloadable + (delq article gnus-newsgroup-downloadable)) + + ;; The downloadable mark is implemented as a + ;; type of read mark. Therefore, marking the + ;; article as unread is sufficient to clear + ;; its downloadable flag. + (gnus-summary-mark-article article gnus-unread-mark) + ;; I just redrew the entire article so + ;; there's no need to update the download + ;; mark below. + nil) + (was-marked-downloadable + (gnus-summary-set-agent-mark article t) + t) + (t t)) + (when (gnus-summary-goto-subject article nil t) + (gnus-summary-update-download-mark article))))))) (when (and (not state) gnus-plugged) (gnus-agent-toggle-plugged nil))) diff --git a/lisp/spam.el b/lisp/spam.el index 9050c3a..22c9dd4 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -418,8 +418,8 @@ your main source of newsgroup names." (when (eq (gnus-summary-article-mark article) gnus-spam-mark) (gnus-summary-mark-article article gnus-expirable-mark) (when (stringp group) - (let ((gnus-current-article article)) - (gnus-summary-move-article nil group))))))) + (gnus-summary-set-process-mark article) + (gnus-summary-move-article nil group)))))) (defun spam-ham-move-routine (&optional group) (let ((articles gnus-newsgroup-articles) @@ -427,12 +427,11 @@ your main source of newsgroup names." (dolist (mark spam-ham-marks) (push (symbol-value mark) ham-mark-values)) - - (dolist (article articles) + (dolist (article articles) (when (and (memq (gnus-summary-article-mark article) ham-mark-values) (stringp group)) - (let ((gnus-current-article article)) - (gnus-summary-move-article nil group)))))) + (gnus-summary-set-process-mark article) + (gnus-summary-move-article nil group))))) (defun spam-generic-register-routine (spam-func ham-func) (let ((articles gnus-newsgroup-articles)