X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;ds=sidebyside;f=lisp%2Fnntp.el;h=531c916fb7285af1da2cb2a39c527406d64c7f8a;hb=09397c64b29d8d18c18206d8adc27a8424fe76ee;hp=4c9cb8530e434f154fee54f53742b52297cd9fed;hpb=d584dad486cca34055fea80df892771be8da8dfc;p=gnus diff --git a/lisp/nntp.el b/lisp/nntp.el index 4c9cb8530..531c916fb 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1987, 1988, 1989, 1990, 1992, 1993, ;; 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, -;; 2003, 2004, 2005 Free Software Foundation, Inc. +;; 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news @@ -104,8 +104,8 @@ This command is used by the methods `nntp-open-telnet-stream', (defvoo nntp-end-of-line "\r\n" "*String to use on the end of lines when talking to the NNTP server. -This is \"\\r\\n\" by default, but should be \"\\n\" when using and -indirect telnet connection method (nntp-open-via-*-and-telnet).") +This is \"\\r\\n\" by default, but should be \"\\n\" when using an indirect +connection method (nntp-open-via-*).") (defvoo nntp-via-rlogin-command "rsh" "*Rlogin command used to connect to an intermediate host. @@ -205,7 +205,7 @@ See `nnml-marks-is-evil' for more information.") (defcustom nntp-marks-directory (nnheader-concat gnus-directory "marks/") "*The directory where marks for nntp groups will be stored." - :group 'gnus + :group 'nntp :type 'directory) (defcustom nntp-authinfo-file "~/.authinfo" @@ -1386,22 +1386,22 @@ password contained in '~/.nntp-authinfo'." (defun nntp-accept-process-output (process) "Wait for output from PROCESS and message some dots." - (save-excursion - (set-buffer (or (nntp-find-connection-buffer nntp-server-buffer) - nntp-server-buffer)) + (with-current-buffer (or (nntp-find-connection-buffer nntp-server-buffer) + nntp-server-buffer) (let ((len (/ (buffer-size) 1024)) message-log-max) (unless (< len 10) (setq nntp-have-messaged t) (nnheader-message 7 "nntp read: %dk" len))) - (nnheader-accept-process-output process) - ;; accept-process-output may update status of process to indicate - ;; that the server has closed the connection. This MUST be - ;; handled here as the buffer restored by the save-excursion may - ;; be the process's former output buffer (i.e. now killed) - (or (and process - (memq (process-status process) '(open run))) - (nntp-report "Server closed connection")))) + (prog1 + (nnheader-accept-process-output process) + ;; accept-process-output may update status of process to indicate + ;; that the server has closed the connection. This MUST be + ;; handled here as the buffer restored by the save-excursion may + ;; be the process's former output buffer (i.e. now killed) + (or (and process + (memq (process-status process) '(open run))) + (nntp-report "Server closed connection"))))) (defun nntp-accept-response () "Wait for output from the process that outputs to BUFFER."