Mercurial > emacs
changeset 94726:e21d5294ec98
(gnus-enter-server-buffer): Make sure the server-buffer
is current before calling gnus-server-prepare.
(gnus-server-setup-buffer, gnus-server-update-server)
(gnus-server-read-server, gnus-browse-exit): Use with-current-buffer.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 07 May 2008 15:07:02 +0000 |
parents | 0fc821738484 |
children | ddce4c48ffb7 |
files | lisp/gnus/ChangeLog lisp/gnus/gnus-srvr.el |
diffstat | 2 files changed, 19 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog Wed May 07 12:52:22 2008 +0000 +++ b/lisp/gnus/ChangeLog Wed May 07 15:07:02 2008 +0000 @@ -1,3 +1,10 @@ +2008-05-07 Stefan Monnier <monnier@iro.umontreal.ca> + + * gnus-srvr.el (gnus-enter-server-buffer): Make sure the server-buffer + is current before calling gnus-server-prepare. + (gnus-server-setup-buffer, gnus-server-update-server) + (gnus-server-read-server, gnus-browse-exit): Use with-current-buffer. + 2008-05-04 Juri Linkov <juri@jurta.org> * mailcap.el (mailcap-replace-in-string): New compatibility alias. @@ -25,8 +32,8 @@ 2008-04-28 Teodor Zlatanov <tzz@lifelogs.com> - * mail-source.el (mail-source-set-1, mail-source-bind): Moved - auth-source code out of the macro to clean it up and fix bugs. + * mail-source.el (mail-source-set-1, mail-source-bind): + Move auth-source code out of the macro to clean it up and fix bugs. 2008-04-26 Teodor Zlatanov <tzz@lifelogs.com>
--- a/lisp/gnus/gnus-srvr.el Wed May 07 12:52:22 2008 +0000 +++ b/lisp/gnus/gnus-srvr.el Wed May 07 15:07:02 2008 +0000 @@ -284,13 +284,17 @@ "Set up the server buffer." (gnus-server-setup-buffer) (gnus-configure-windows 'server) - (gnus-server-prepare)) + ;; Usually `gnus-configure-windows' will finish with the + ;; `gnus-server-buffer' selected as the current buffer, but not always (I + ;; bumped into it when starting from a dedicated *Group* frame, and + ;; gnus-configure-windows opened *Server* into its own dedicated frame). + (with-current-buffer (get-buffer gnus-server-buffer) + (gnus-server-prepare))) (defun gnus-server-setup-buffer () "Initialize the server buffer." (unless (get-buffer gnus-server-buffer) - (save-excursion - (set-buffer (gnus-get-buffer-create gnus-server-buffer)) + (with-current-buffer (gnus-get-buffer-create gnus-server-buffer) (gnus-server-mode) (when gnus-carpal (gnus-carpal-setup-buffer 'server))))) @@ -341,8 +345,7 @@ (defconst gnus-server-edit-buffer "*Gnus edit server*") (defun gnus-server-update-server (server) - (save-excursion - (set-buffer gnus-server-buffer) + (with-current-buffer gnus-server-buffer (let* ((buffer-read-only nil) (entry (assoc server gnus-server-alist)) (oentry (assoc (gnus-server-to-method server) @@ -618,8 +621,7 @@ (let ((buf (current-buffer))) (prog1 (gnus-browse-foreign-server server buf) - (save-excursion - (set-buffer buf) + (with-current-buffer buf (gnus-server-update-server (gnus-server-server-name)) (gnus-server-position-point))))) @@ -960,8 +962,7 @@ (when (eq major-mode 'gnus-browse-mode) (gnus-kill-buffer (current-buffer))) ;; Insert the newly subscribed groups in the group buffer. - (save-excursion - (set-buffer gnus-group-buffer) + (with-current-buffer gnus-group-buffer (gnus-group-list-groups nil)) (if gnus-browse-return-buffer (gnus-configure-windows 'server 'force)