From: Chong Yidong Date: Sun, 30 Oct 2005 20:34:53 +0000 (+0000) Subject: * imap.el (imap-open): Handle case where buffer is a buffer X-Git-Tag: emacs-pretest-22.0.90~6178 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ab513ed4f483e18bd65c6794ce1d70cdc542f06a;p=emacs.git * imap.el (imap-open): Handle case where buffer is a buffer object. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d6d4d99a853..320132460a3 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2005-10-30 Chong Yidong + + * imap.el (imap-open): Handle case where buffer is a buffer + object. + 2005-10-24 Eli Zaretskii * pgg-def.el: diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index b66d9eded8a..2be30aa6e47 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el @@ -1038,8 +1038,11 @@ necessary. If nil, the buffer name is generated." stream)) ;; We're done, kill the first connection (imap-close buffer) - (kill-buffer buffer) - (rename-buffer buffer) + (let ((name (if (stringp buffer) + buffer + (buffer-name buffer)))) + (kill-buffer buffer) + (rename-buffer name)) (message "imap: Reconnecting with stream `%s'...done" stream) (setq imap-stream stream)