T-gnus 6.14.6; synch up with Gnus v5.8.8.
[elisp/gnus.git-] / lisp / pop3.el
index dabe4ee..00cdcea 100644 (file)
@@ -7,7 +7,6 @@
 ;;      Daiki Ueno  <ueno@ueda.info.waseda.ac.jp>
 ;; Maintainer: FSF
 ;; Keywords: mail
-;; Version: 1.3s
 
 ;; This file is part of GNU Emacs.
 
@@ -42,8 +41,6 @@
 
 (require 'mail-utils)
 
-(defconst pop3-version "1.3s")
-
 (defvar pop3-maildrop (or (user-login-name) (getenv "LOGNAME") (getenv "USER") nil)
   "*POP3 maildrop.")
 (defvar pop3-mailhost (or (getenv "MAILHOST") nil)
@@ -94,6 +91,12 @@ Nil means no, t means yes, not-nil-or-t means yet to be determined.")
   (autoload 'starttls-open-stream "starttls")
   (autoload 'starttls-negotiate "starttls"))
 
+(defvar pop3-ssl-program-name
+  (if (exec-installed-p "openssl")
+      "openssl"
+    "ssleay")
+  "The program to run in a subprocess to open an SSL connection.")
+
 (defvar pop3-ssl-program-arguments
   '("s_client" "-quiet")
   "Arguments to be passed to the program `pop3-ssl-program-name'.")
@@ -188,10 +191,7 @@ Argument PORT specifies connecting port."
 (defun pop3-open-ssl-stream-1 (name buffer host service extra-arg)
   (require 'path-util)
   (let* ((ssl-program-name
-         (cond ((exec-installed-p "openssl")
-                "openssl")
-               (t
-                "ssleay")))
+         pop3-ssl-program-name)
         (ssl-program-arguments
          `(,@pop3-ssl-program-arguments ,extra-arg
            "-connect" ,(format "%s:%d" host service)))
@@ -255,8 +255,8 @@ Args are NAME BUFFER HOST SERVICE."
     )
 
 (defun pop3-read-response (process &optional return)
-  "Read the response from the server PROCESS.
-Return the response string if optional second argument RETURN is non-nil."
+  "Read the response from the server.
+Return the response string if optional second argument is non-nil."
   (let ((case-fold-search nil)
        match-end)
     (save-excursion
@@ -418,8 +418,9 @@ Return the response string if optional second argument RETURN is non-nil."
         (lambda (atom)
           (when (car (symbol-value atom))
             (insert (format "%s\n" atom))))
-        pop3-uidl-obarray)))))
-    
+        pop3-uidl-obarray)))
+    (fillarray pop3-uidl-obarray 0)))
+
 
 ;; The Command Set
 
@@ -541,14 +542,7 @@ and close the connection."
     (save-excursion
       (set-buffer (process-buffer process))
       (goto-char (point-max))
-      (delete-process process)
-      ))
-  (when pop3-leave-mail-on-server
-    (mapatoms
-     (lambda (atom)
-       (when (car (symbol-value atom))
-        (unintern atom pop3-uidl-obarray)))
-     pop3-uidl-obarray)))
+      (delete-process process))))
 
 (defun pop3-uidl (process &optional msgno)
   "Return the results of a UIDL command in PROCESS for optional MSGNO.