From: yamaoka Date: Tue, 5 Feb 2002 05:10:57 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_6-01-quimby~72 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=9de70eb526e01c8e5736af1215be65668111b1d5;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 51858fa..2de5b28 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2002-02-04 ShengHuo ZHU + * nntp.el (nntp-send-command-and-decode): Check PROCESS. + * mm-url.el (mm-url-load-url): New function. (mm-url-insert-file-contents): Use it. diff --git a/lisp/nntp.el b/lisp/nntp.el index 551a3d5..68864d1 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -464,22 +464,26 @@ noticing asynchronous data.") (set-buffer nntp-server-buffer) (erase-buffer))) (let* ((command (mapconcat 'identity strings " ")) - (buffer (process-buffer (nntp-find-connection nntp-server-buffer))) - (pos (with-current-buffer buffer (point)))) - (prog1 - (nntp-retrieve-data command - nntp-address nntp-port-number nntp-server-buffer - wait-for nnheader-callback-function t) - ;; If nothing to wait for, still remove possibly echo'ed commands - (unless wait-for - (nntp-accept-response) - (save-excursion + (process (nntp-find-connection nntp-server-buffer)) + (buffer (and process (process-buffer process))) + (pos (and buffer (with-current-buffer buffer (point))))) + (if process + (prog1 + (nntp-retrieve-data command + nntp-address nntp-port-number + nntp-server-buffer + wait-for nnheader-callback-function t) + ;; If nothing to wait for, still remove possibly echo'ed commands + (unless wait-for + (nntp-accept-response) + (save-excursion (set-buffer buffer) (goto-char pos) (if (looking-at (regexp-quote command)) - (delete-region pos (progn - (forward-line 1) - (gnus-point-at-bol))))))))) + (delete-region pos (progn (forward-line 1) (gnus-point-at-bol)))) + ))) + (nnheader-report 'nntp "Couldn't open connection to %s." + nntp-address)))) (defun nntp-send-buffer (wait-for) "Send the current buffer to server and wait until WAIT-FOR returns."