Patch by Ed L. Cashin to make gnus-move-split-methods move to
[gnus] / lisp / nntp.el
index ffb6812..6044c93 100644 (file)
@@ -180,7 +180,8 @@ server there that you can connect to.  See also
 
 (defvoo nntp-connection-timeout nil
   "*Number of seconds to wait before an nntp connection times out.
-If this variable is nil, which is the default, no timers are set.")
+If this variable is nil, which is the default, no timers are set.
+NOTE: This variable is never seen to work in FSF Emacs 20 and XEmacs 21.")
 
 ;;; Internal variables.
 
@@ -351,7 +352,11 @@ noticing asynchronous data.")
             (t t)))
        (error 
         (nnheader-report 'nntp "Couldn't open connection to %s: %s" 
-                         address err))))))
+                         address err))
+       (quit
+        (message "Quit retrieving data from nntp")
+        (signal 'quit nil)
+        nil)))))
 
 (defsubst nntp-send-command (wait-for &rest strings)
   "Send STRINGS to server and wait until WAIT-FOR returns."
@@ -799,8 +804,9 @@ If SEND-IF-FORCE, only send authinfo to the server if the
           (or passwd
               nntp-authinfo-password
               (setq nntp-authinfo-password
-                    (mail-source-read-passwd (format "NNTP (%s@%s) password: "
-                                                     user nntp-address))))))))))
+                    (mail-source-read-passwd
+                     (format "NNTP (%s@%s) password: "
+                             user nntp-address))))))))))
 
 (defun nntp-send-nosy-authinfo ()
   "Send the AUTHINFO to the nntp server."
@@ -872,7 +878,11 @@ password contained in '~/.nntp-authinfo'."
                     (coding-system-for-write nntp-coding-system-for-write))
                (funcall nntp-open-connection-function pbuffer))
            (error nil)
-           (quit nil))))
+           (quit
+            (message "Quit opening connection")
+            (nntp-kill-buffer pbuffer)
+            (signal 'quit nil)
+            nil))))
     (when timer
       (nnheader-cancel-timer timer))
     (when (and (buffer-name pbuffer)