--- nntp.el.old 2002-12-14 14:22:49.000000000 +0100 +++ nntp.el 2002-12-14 14:27:55.000000000 +0100 @@ -218,6 +218,7 @@ (defvar nntp-process-to-buffer nil) (defvar nntp-process-callback nil) (defvar nntp-process-decode nil) +(defvar nntp-process-delete-echo t) (defvar nntp-process-start-point nil) (defvar nntp-inside-change-function nil) (defvoo nntp-last-command-time nil) @@ -411,14 +412,15 @@ (unless (or wait-for (equal nntp-open-connection-function 'nntp-open-network-stream)) - (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)))) - ))) + (when nntp-process-delete-echo + (nntp-accept-response) + (goto-char pos) + (if (setq nntp-process-delete-echo (looking-at (regexp-quote command))) + (delete-region pos (progn (forward-line 1) + (gnus-point-at-bol)))) + )))) (nnheader-report 'nntp "Couldn't open connection to %s." nntp-address)))) @@ -435,15 +437,20 @@ nntp-server-buffer wait-for nnheader-callback-function) ;; If nothing to wait for, still remove possibly echo'ed commands - (unless wait-for - (nntp-accept-response) + ;; We don't have echos if nntp-open-connection-function + ;; is `nntp-open-network-stream', so we skip this in that case. + (unless (or wait-for + (equal nntp-open-connection-function + 'nntp-open-network-stream)) (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)))) - ))) + (when nntp-process-delete-echo + (nntp-accept-response) + (goto-char pos) + (if (setq nntp-process-delete-echo (looking-at (regexp-quote command))) + (delete-region pos (progn (forward-line 1) + (gnus-point-at-bol)))) + )))) (nnheader-report 'nntp "Couldn't open connection to %s." nntp-address)))) @@ -465,14 +472,20 @@ 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) + ;; We don't have echos if nntp-open-connection-function + ;; is `nntp-open-network-stream', so we skip this in that case. + (unless (or wait-for + (equal nntp-open-connection-function + 'nntp-open-network-stream)) (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)))) - ))) + (set-buffer buffer) + (when nntp-process-delete-echo + (nntp-accept-response) + (goto-char pos) + (if (setq nntp-process-delete-echo (looking-at (regexp-quote command))) + (delete-region pos (progn (forward-line 1) + (gnus-point-at-bol)))) + )))) (nnheader-report 'nntp "Couldn't open connection to %s." nntp-address)))) @@ -1048,6 +1061,7 @@ (set (make-local-variable 'nntp-process-to-buffer) nil) (set (make-local-variable 'nntp-process-start-point) nil) (set (make-local-variable 'nntp-process-decode) nil) + (make-local-variable 'nntp-process-delete-echo) (current-buffer))) (defun nntp-open-connection (buffer)