Synch to No Gnus 200506160601, and
[elisp/gnus.git-] / lisp / imap.el
index 9277a09..48818d1 100644 (file)
@@ -222,7 +222,7 @@ pipe, or t or `pty' to use a pty.  The value has no effect if the
 system has no ptys or if all ptys are busy: then a pipe is used
 in any case.  The value takes effect when a IMAP server is
 opened, changing it after that has no effect."
-  :version "21.4"
+  :version "22.1"
   :group 'imap
   :type 'boolean)
 
@@ -235,12 +235,20 @@ encoded mailboxes which doesn't translate into ISO-8859-1."
   :type 'boolean)
 
 (defcustom imap-log nil
-  "If non-nil, a imap session trace is placed in *imap-log* buffer."
+  "If non-nil, a imap session trace is placed in *imap-log* buffer.
+Note that username, passwords and other privacy sensitive
+information (such as e-mail) may be stored in the *imap-log*
+buffer.  It is not written to disk, however.  Do not enable this
+variable unless you are comfortable with that."
   :group 'imap
   :type 'boolean)
 
 (defcustom imap-debug nil
-  "If non-nil, random debug spews are placed in *imap-debug* buffer."
+  "If non-nil, random debug spews are placed in *imap-debug* buffer.
+Note that username, passwords and other privacy sensitive
+information (such as e-mail) may be stored in the *imap-debug*
+buffer.  It is not written to disk, however.  Do not enable this
+variable unless you are comfortable with that."
   :group 'imap
   :type 'boolean)
 
@@ -627,6 +635,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
@@ -637,7 +649,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))
@@ -1113,7 +1125,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)