From 91b1fb7a05a38120e10dce250fd16c4e0cfa9ae3 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 24 Sep 2004 03:38:24 +0000 Subject: [PATCH] Synch to No Gnus 200409240331. --- lisp/gnus-agent.el | 27 +++++++++++++++++---------- lisp/gnus-int.el | 19 ++----------------- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 33a130f..ca0ea7a 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -835,20 +835,27 @@ be a select method." (defun gnus-agent-synchronize-flags-server (method) "Synchronize flags set when unplugged for server." - (let ((gnus-command-method method)) + (let ((gnus-command-method method) + (gnus-agent nil)) (when (file-exists-p (gnus-agent-lib-file "flags")) (set-buffer (get-buffer-create " *Gnus Agent flag synchronize*")) (erase-buffer) (nnheader-insert-file-contents (gnus-agent-lib-file "flags")) - (if (null (gnus-check-server gnus-command-method)) - (gnus-message 1 "Couldn't open server %s" (nth 1 gnus-command-method)) - (while (not (eobp)) - (if (null (eval (read (current-buffer)))) - (gnus-delete-line) - (write-file (gnus-agent-lib-file "flags")) - (error "Couldn't set flags from file %s" - (gnus-agent-lib-file "flags")))) - (delete-file (gnus-agent-lib-file "flags"))) + (cond ((null gnus-plugged) + (gnus-message + 1 "You must be plugged to synchronize flags with server %s" + (nth 1 gnus-command-method))) + ((null (gnus-check-server gnus-command-method)) + (gnus-message + 1 "Couldn't open server %s" (nth 1 gnus-command-method))) + (t + (while (not (eobp)) + (if (null (eval (read (current-buffer)))) + (gnus-delete-line) + (write-file (gnus-agent-lib-file "flags")) + (error "Couldn't set flags from file %s" + (gnus-agent-lib-file "flags")))) + (delete-file (gnus-agent-lib-file "flags")))) (kill-buffer nil)))) (defun gnus-agent-possibly-synchronize-flags-server (method) diff --git a/lisp/gnus-int.el b/lisp/gnus-int.el index c2ed96a..1f8707d 100644 --- a/lisp/gnus-int.el +++ b/lisp/gnus-int.el @@ -54,13 +54,6 @@ server denied." (const :tag "Deny server" denied) (const :tag "Unplug Agent" offline))) -(defcustom gnus-servers-that-use-local-marks '(nntp) - "A list of backends that store marks locally. This means that - the backend is used to set its marks even when unplugged." - :version "21.4" - :group 'gnus-start - :type '(repeat symbol)) - (defvar gnus-internal-registry-spool-current-method nil "The current method, for the registry.") @@ -421,11 +414,7 @@ If FETCH-OLD, retrieve all headers (or some subset thereof) in the group." (defun gnus-request-set-mark (group action) "Set marks on articles in the back end." - (let* ((gnus-command-method (gnus-find-method-for-group group)) - (gnus-agent (if (member (car gnus-command-method) - gnus-servers-that-use-local-marks) - nil - gnus-agent))) + (let ((gnus-command-method (gnus-find-method-for-group group))) (if (not (gnus-check-backend-function 'request-set-mark (car gnus-command-method))) action @@ -435,11 +424,7 @@ If FETCH-OLD, retrieve all headers (or some subset thereof) in the group." (defun gnus-request-update-mark (group article mark) "Allow the back end to change the mark the user tries to put on an article." - (let* ((gnus-command-method (gnus-find-method-for-group group)) - (gnus-agent (if (member (car gnus-command-method) - gnus-servers-that-use-local-marks) - nil - gnus-agent))) + (let ((gnus-command-method (gnus-find-method-for-group group))) (if (not (gnus-check-backend-function 'request-update-mark (car gnus-command-method))) mark -- 1.7.10.4