* nntp.el (nntp-retrieve-groups): Check whether BUF is live.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 3 Feb 2002 15:21:15 +0000 (15:21 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 3 Feb 2002 15:21:15 +0000 (15:21 +0000)
lisp/ChangeLog
lisp/message.el
lisp/nntp.el

index 30922a7..7ecde99 100644 (file)
@@ -1,5 +1,7 @@
 2002-02-03  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
+       * nntp.el (nntp-retrieve-groups): Check whether BUF is live.
+
        * message.el (message-forward-rmail-make-body): Directly use
        rmail-msg-restore-non-pruned-header to avoid calling
        vertical-motion.
index e26a85f..cdd2497 100644 (file)
@@ -5022,6 +5022,8 @@ Optional DIGEST will use digest to forward."
 (defun message-forward-rmail-make-body (forward-buffer)
   (save-window-excursion
     (set-buffer forward-buffer)
+    ;; Rmail doesn't have rmail-msg-restore-non-pruned-header in Emacs
+    ;; 20.  FIXIT, or we drop support for rmail in Emacs 20.
     (if (rmail-msg-is-pruned)
        (rmail-msg-restore-non-pruned-header)))
   (message-forward-make-body forward-buffer))
index 3e57e1e..3a0265b 100644 (file)
@@ -577,6 +577,10 @@ noticing asynchronous data.")
              (command (if nntp-server-list-active-group
                           "LIST ACTIVE" "GROUP")))
          (while groups
+           ;; Timeout may have killed the buffer.
+           (unless (gnus-buffer-live-p buf)
+             (nnheader-report 'nntp "Connection to %s is closed." server)
+             (throw 'done nil))
            ;; Send the command to the server.
            (nntp-send-command nil command (pop groups))
            (incf count)