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.
(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))
(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)