From ab513ed4f483e18bd65c6794ce1d70cdc542f06a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 30 Oct 2005 20:34:53 +0000 Subject: [PATCH] * imap.el (imap-open): Handle case where buffer is a buffer object. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/imap.el | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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) -- 2.39.5