From: Eric Abrahamsen Date: Thu, 27 Aug 2020 15:00:14 +0000 (-0700) Subject: Set Gnus server 'closed status in gnus-close-server X-Git-Tag: emacs-28.0.90~6350 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1153b238aef5a48bbecd5a58cd6a14dae9ec1d2f;p=emacs.git Set Gnus server 'closed status in gnus-close-server * lisp/gnus/gnus-int.el (gnus-close-server): Set 'closed status here. * lisp/gnus/gnus-group.el (gnus-group-suspend): Not here. --- diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 97e10a37a21..d613bc86ad7 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -4300,8 +4300,7 @@ The hook `gnus-suspend-gnus-hook' is called before actually suspending." ;; Closing all the backends is useful (for instance) when when the ;; IP addresses have changed and you need to reconnect. (dolist (elem gnus-opened-servers) - (gnus-close-server (car elem)) - (setcar (cdr elem) 'closed)) + (gnus-close-server (car elem))) (when group-buf (bury-buffer group-buf) (delete-windows-on group-buf t)))) diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 60ebc07c343..da385a18023 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -351,9 +351,12 @@ If it is down, start it up (again)." "Close the connection to GNUS-COMMAND-METHOD." (when (stringp gnus-command-method) (setq gnus-command-method (gnus-server-to-method gnus-command-method))) - (funcall (gnus-get-function gnus-command-method 'close-server) - (nth 1 gnus-command-method) - (nthcdr 2 gnus-command-method))) + (prog1 + (funcall (gnus-get-function gnus-command-method 'close-server) + (nth 1 gnus-command-method) + (nthcdr 2 gnus-command-method)) + (when-let ((elem (assoc gnus-command-method gnus-opened-servers))) + (setf (nth 1 elem) 'closed)))) (defun gnus-request-list (gnus-command-method) "Request the active file from GNUS-COMMAND-METHOD."