# HG changeset patch # User Chong Yidong # Date 1130704493 0 # Node ID 68bb9e8a53906346a9b6d9ab94afe47e66496db0 # Parent 50f828c2b33759a69b01f2d2dfef23adf3d64732 * imap.el (imap-open): Handle case where buffer is a buffer object. diff -r 50f828c2b337 -r 68bb9e8a5390 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Sun Oct 30 20:08:09 2005 +0000 +++ b/lisp/gnus/ChangeLog Sun Oct 30 20:34:53 2005 +0000 @@ -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 -r 50f828c2b337 -r 68bb9e8a5390 lisp/gnus/imap.el --- a/lisp/gnus/imap.el Sun Oct 30 20:08:09 2005 +0000 +++ b/lisp/gnus/imap.el Sun Oct 30 20:34:53 2005 +0000 @@ -1038,8 +1038,11 @@ 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)