2001-09-29 Simon Josefsson <jas@extundo.com>
authorSimon Josefsson <jas@extundo.com>
Sat, 29 Sep 2001 17:03:43 +0000 (17:03 +0000)
committerSimon Josefsson <jas@extundo.com>
Sat, 29 Sep 2001 17:03:43 +0000 (17:03 +0000)
* imap.el (imap-shell-host, imap-default-user, imap-use-utf7)
(imap-log, imap-debug): Custom.
(imap-log-buffer, imap-debug-buffer): New constants.
(imap-kerberos4-open, imap-gssapi-open, imap-ssl-open)
(imap-network-open, imap-shell-open, imap-starttls-open)
(imap-send-command-1, imap-send-command, imap-arrival-filter)
(imap-debug): Use imap-*-buffer.

lisp/ChangeLog
lisp/imap.el

index d8602ba..e9497f7 100644 (file)
@@ -1,5 +1,13 @@
 2001-09-29  Simon Josefsson  <jas@extundo.com>
 
+       * imap.el (imap-shell-host, imap-default-user, imap-use-utf7) 
+       (imap-log, imap-debug): Custom.
+       (imap-log-buffer, imap-debug-buffer): New constants.
+       (imap-kerberos4-open, imap-gssapi-open, imap-ssl-open) 
+       (imap-network-open, imap-shell-open, imap-starttls-open) 
+       (imap-send-command-1, imap-send-command, imap-arrival-filter) 
+       (imap-debug): Use imap-*-buffer.
+
        * nndoc.el (nndoc-article-type): Add mailman.
        (nndoc-type-alist): Ditto.
        (nndoc-mailman-type-p): New function.
index dce291f..a4fecd0 100644 (file)
@@ -1,5 +1,5 @@
 ;;; imap.el --- imap library
-;; Copyright (C) 1998, 1999, 2000
+;; Copyright (C) 1998, 1999, 2000, 2001
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <jas@pdc.kth.se>
@@ -219,14 +219,33 @@ until a successful connection is made."
   :group 'imap
   :type 'boolean)
 
-(defvar imap-shell-host "gateway"
-  "Hostname of rlogin proxy.")
+(defcustom imap-use-utf7 t
+  "If non-nil, do utf7 encoding/decoding of mailbox names.
+Since the UTF7 decoding currently only decodes into ISO-8859-1
+characters, you may disable this decoding if you need to access UTF7
+encoded mailboxes which doesn't translate into ISO-8859-1."
+  :group 'imap
+  :type 'boolean)
 
-(defvar imap-default-user (user-login-name)
-  "Default username to use.")
+(defcustom imap-log nil
+  "If non-nil, a imap session trace is placed in *imap-log* buffer."
+  :group 'imap
+  :type 'boolean)
 
-(defvar imap-error nil
-  "Error codes from the last command.")
+(defcustom imap-debug nil
+  "If non-nil, random debug spews are placed in *imap-debug* buffer."
+  :group 'imap
+  :type 'boolean)
+
+(defcustom imap-shell-host "gateway"
+  "Hostname of rlogin proxy."
+  :group 'imap
+  :type 'string)
+
+(defcustom imap-default-user (user-login-name)
+  "Default username to use."
+  :group 'imap
+  :type 'string)
 
 ;; Various variables.
 
@@ -274,11 +293,8 @@ NAME names the authenticator.  CHECK is a function returning non-nil if
 the server support the authenticator and AUTHENTICATE is a function
 for doing the actuall authentification.")
 
-(defvar imap-use-utf7 t
-  "If non-nil, do utf7 encoding/decoding of mailbox names.
-Since the UTF7 decoding currently only decodes into ISO-8859-1
-characters, you may disable this decoding if you need to access UTF7
-encoded mailboxes which doesn't translate into ISO-8859-1.")
+(defvar imap-error nil
+  "Error codes from the last command.")
 
 ;; Internal constants.  Change theese and die.
 
@@ -307,6 +323,8 @@ encoded mailboxes which doesn't translate into ISO-8859-1.")
                                 imap-process
                                 imap-calculate-literal-size-first
                                 imap-mailbox-data))
+(defconst imap-log-buffer "*imap-log*")
+(defconst imap-debug-buffer "*imap-debug*")
 
 ;; Internal variables.
 
@@ -374,14 +392,6 @@ human readable response text (a string).")
   "Non-nil indicates that the server emitted a continuation request.
 The actually value is really the text on the continuation line.")
 
-(defvar imap-log nil
-  "Name of buffer for imap session trace.
-For example: (setq imap-log \"*imap-log*\")")
-
-(defvar imap-debug nil                 ;"*imap-debug*"
-  "Name of buffer for random debug spew.
-For example: (setq imap-debug \"*imap-debug*\")")
-
 \f
 ;; Utility functions:
 
@@ -489,7 +499,7 @@ If ARGS, PROMPT is used as an argument to `format'."
              (accept-process-output process 1)
              (sit-for 1))
            (and imap-log
-                (with-current-buffer (get-buffer-create imap-log)
+                (with-current-buffer (get-buffer-create imap-log-buffer)
                   (imap-disable-multibyte)
                   (buffer-disable-undo)
                   (goto-char (point-max))
@@ -550,7 +560,7 @@ If ARGS, PROMPT is used as an argument to `format'."
              (accept-process-output process 1)
              (sit-for 1))
            (and imap-log
-                (with-current-buffer (get-buffer-create imap-log)
+                (with-current-buffer (get-buffer-create imap-log-buffer)
                   (imap-disable-multibyte)
                   (buffer-disable-undo)
                   (goto-char (point-max))
@@ -599,7 +609,7 @@ If ARGS, PROMPT is used as an argument to `format'."
              (accept-process-output process 1)
              (sit-for 1))
            (and imap-log
-                (with-current-buffer (get-buffer-create imap-log)
+                (with-current-buffer (get-buffer-create imap-log-buffer)
                   (imap-disable-multibyte)
                   (buffer-disable-undo)
                   (goto-char (point-max))
@@ -630,7 +640,7 @@ If ARGS, PROMPT is used as an argument to `format'."
        (accept-process-output process 1)
        (sit-for 1))
       (and imap-log
-          (with-current-buffer (get-buffer-create imap-log)
+          (with-current-buffer (get-buffer-create imap-log-buffer)
             (imap-disable-multibyte)
             (buffer-disable-undo)
             (goto-char (point-max))
@@ -667,7 +677,7 @@ If ARGS, PROMPT is used as an argument to `format'."
            (accept-process-output process 1)
            (sit-for 1))
          (and imap-log
-              (with-current-buffer (get-buffer-create imap-log)
+              (with-current-buffer (get-buffer-create imap-log-buffer)
                 (imap-disable-multibyte)
                 (buffer-disable-undo)
                 (goto-char (point-max))
@@ -705,7 +715,7 @@ If ARGS, PROMPT is used as an argument to `format'."
        (accept-process-output process 1)
        (sit-for 1))
       (and imap-log
-          (with-current-buffer (get-buffer-create imap-log)
+          (with-current-buffer (get-buffer-create imap-log-buffer)
             (buffer-disable-undo)
             (goto-char (point-max))
             (insert-buffer-substring buffer)))
@@ -1562,7 +1572,7 @@ on failure."
 (defun imap-send-command-1 (cmdstr)
   (setq cmdstr (concat cmdstr imap-client-eol))
   (and imap-log
-       (with-current-buffer (get-buffer-create imap-log)
+       (with-current-buffer (get-buffer-create imap-log-buffer)
         (imap-disable-multibyte)
         (buffer-disable-undo)
         (goto-char (point-max))
@@ -1606,7 +1616,7 @@ on failure."
                         (with-current-buffer cmd
                           (and imap-log
                                (with-current-buffer (get-buffer-create
-                                                     imap-log)
+                                                     imap-log-buffer)
                                  (imap-disable-multibyte)
                                  (buffer-disable-undo)
                                  (goto-char (point-max))
@@ -1669,7 +1679,7 @@ Return nil if no complete line has arrived."
     (goto-char (point-max))
     (insert string)
     (and imap-log
-        (with-current-buffer (get-buffer-create imap-log)
+        (with-current-buffer (get-buffer-create imap-log-buffer)
           (imap-disable-multibyte)
           (buffer-disable-undo)
           (goto-char (point-max))
@@ -2546,8 +2556,8 @@ Return nil if no complete line has arrived."
 
 (when imap-debug                       ; (untrace-all)
   (require 'trace)
-  (buffer-disable-undo (get-buffer-create imap-debug))
-  (mapcar (lambda (f) (trace-function-background f imap-debug))
+  (buffer-disable-undo (get-buffer-create imap-debug-buffer))
+  (mapcar (lambda (f) (trace-function-background f imap-debug-buffer))
          '(
            imap-read-passwd
            imap-utf7-encode