Synch to Oort Gnus 200303171420.
[elisp/gnus.git-] / lisp / mail-source.el
index d0e7afa..53401bc 100644 (file)
@@ -988,14 +988,14 @@ This only works when `display-time' is enabled."
 (defun mail-source-fetch-imap (source callback)
   "Fetcher for imap sources."
   (mail-source-bind (imap source)
-    (let ((from (format "%s:%s:%s" server user port))
-         (found 0)
-         (buf (get-buffer-create
-               (format " *imap source %s:%s:%s *" server user mailbox)))
-         (mail-source-string (format "imap:%s:%s" server mailbox))
-         (imap-shell-program (or (list program) imap-shell-program))
-         remove)
-      (if (and (imap-open server port stream authentication buf)
+    (let* ((from (format "%s:%s:%s" server user port))
+          (found 0)
+          (buffer-name " *imap source*")
+          (buf (get-buffer-create (generate-new-buffer-name buffer-name)))
+          (mail-source-string (format "imap:%s:%s" server mailbox))
+          (imap-shell-program (or (list program) imap-shell-program))
+          remove)
+      (if (and (imap-open server port stream authentication buffer-name)
               (imap-authenticate
                user (or (cdr (assoc from mail-source-password-cache))
                         password) buf)