Synch to No Gnus 200510111141.
[elisp/gnus.git-] / lisp / imap.el
index bb57de5..f26590f 100644 (file)
@@ -1,6 +1,7 @@
 ;;; imap.el --- imap library
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-;;        Free Software Foundation, Inc.
+
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+;;   2005 Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <jas@pdc.kth.se>
 ;; Keywords: mail
@@ -19,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -635,6 +636,10 @@ sure of changing the value of `foo'."
       (erase-buffer)
       (let ((port (or port imap-default-ssl-port))
            (process-connection-type imap-process-connection-type)
+           (set-process-query-on-exit-flag
+            (if (fboundp 'set-process-query-on-exit-flag)
+                'set-process-query-on-exit-flag
+              'process-kill-without-query))
            process)
        (when (prog1
                  (setq process (as-binary-process
@@ -645,7 +650,7 @@ sure of changing the value of `foo'."
                                               (format-spec-make
                                                ?s server
                                                ?p (number-to-string port))))))
-               (process-kill-without-query process))
+               (funcall set-process-query-on-exit-flag process nil))
          (with-current-buffer buffer
            (goto-char (point-min))
            (while (and (memq (process-status process) '(open run))
@@ -1121,7 +1126,7 @@ password is remembered in the buffer."
   (with-current-buffer (or buffer (current-buffer))
     (if (not (eq imap-state 'nonauth))
        (or (eq imap-state 'auth)
-           (eq imap-state 'select)
+           (eq imap-state 'selected)
            (eq imap-state 'examine))
       (make-local-variable 'imap-username)
       (make-local-variable 'imap-password)