From: yamaoka Date: Wed, 29 Sep 2004 03:27:06 +0000 (+0000) Subject: Synch to No Gnus 200409290324. X-Git-Tag: t-gnus-6_17_4-quimby-~740 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=813d2897a6ac7cc3422bbdfb41251db3e73cb785;p=elisp%2Fgnus.git- Synch to No Gnus 200409290324. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d6e2f27..4d45c61 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2004-09-28 Kevin Greiner + + * gnus-agent.el (gnus-agent-synchronize-group-flags): Replaced + gnus-requst-update-info with explicit code to sync the in-memory + info read flags with the marks being sync'd to the backend. + + *gnus-util.el (gnus-pp): Added optional stream to match pp API. + 2004-09-28 Teodor Zlatanov * spam.el (spam-verify-bogofilter): new function diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 686a17e..b4b46e9 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -1217,14 +1217,30 @@ This can be added to `gnus-select-article-hook' or ;;; Internal functions ;;; -(defun gnus-agent-synchronize-group-flags (group action server) -"Update a plugged group by performing the indicated action." +(defun gnus-agent-synchronize-group-flags (group actions server) +"Update a plugged group by performing the indicated actions." (let* ((gnus-command-method (gnus-server-to-method server)) - (info (gnus-get-info group))) - (gnus-request-set-mark group action) + (info (or (gnus-get-info group) + (gnus-get-info (gnus-group-full-name + group gnus-command-method))))) + (gnus-request-set-mark group actions) (when info - (gnus-request-update-info info gnus-command-method)) + (dolist (action actions) + (let ((range (nth 0 action)) + (what (nth 1 action)) + (marks (nth 2 action))) + (when (memq 'read marks) + (gnus-info-set-read + info + (funcall (if (eq what 'add) + 'gnus-range-add + 'gnus-remove-from-range) + (gnus-info-read info) + range)) + (gnus-get-unread-articles-in-group + info + (gnus-active (gnus-info-group info))))))) nil)) (defun gnus-agent-save-active (method) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 2be7de7..b3be625 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -669,11 +669,11 @@ Bind `print-quoted' and `print-readably' to t, and `print-length' and `print-level' to nil. See also `gnus-bind-print-variables'." (gnus-bind-print-variables (prin1-to-string form))) -(defun gnus-pp (form) +(defun gnus-pp (form &optional stream) "Use `pp' on FORM in the current buffer. Bind `print-quoted' and `print-readably' to t, and `print-length' and `print-level' to nil. See also `gnus-bind-print-variables'." - (gnus-bind-print-variables (pp form (current-buffer)))) + (gnus-bind-print-variables (pp form (or stream (current-buffer))))) (defun gnus-pp-to-string (form) "The same as `pp-to-string'.