From f93b46ad7c665d1b8dc44718251ed75281919cfe Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Tue, 27 Feb 2007 01:55:36 +0000 Subject: [PATCH] (nntp-never-echoes-commands) (nntp-open-connection-functions-never-echo-commands): New variables. (nntp-send-command): Use them. --- lisp/ChangeLog | 6 ++++++ lisp/nntp.el | 28 +++++++++++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 82ae2be48..3ebd9dae6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-02-27 Katsumi Yamaoka + + * nntp.el (nntp-never-echoes-commands) + (nntp-open-connection-functions-never-echo-commands): New variables. + (nntp-send-command): Use them. + 2007-02-20 Daiki Ueno * mml2015.el (mml2015-epg-verify): Simplified. diff --git a/lisp/nntp.el b/lisp/nntp.el index e6bd05b23..aa34293f5 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -90,6 +90,21 @@ Indirect connections: - `nntp-open-via-rlogin-and-netcat', - `nntp-open-via-telnet-and-telnet'.") +(defvoo nntp-never-echoes-commands nil + "*Non-nil means the nntp server never echoes commands. +It is reported that some nntps server doesn't echo commands. So, you +may want to set this to non-nil in the method for such a server setting +`nntp-open-connection-function' to `nntp-open-ssl-stream' for example. +Note that the `nntp-open-connection-functions-never-echo-commands' +variable overrides the nil value of this variable.") + +(defvoo nntp-open-connection-functions-never-echo-commands + '(nntp-open-network-stream) + "*List of functions that never echo commands. +Add or set a function which you set to `nntp-open-connection-function' +to this list if it does not echo commands. Note that a non-nil value +of the `nntp-never-echoes-commands' variable overrides this variable.") + (defvoo nntp-pre-command nil "*Pre-command to use with the various nntp-open-via-* methods. This is where you would put \"runsocks\" or stuff like that.") @@ -479,12 +494,15 @@ be restored and the command retried." nntp-server-buffer wait-for nnheader-callback-function) ;; If nothing to wait for, still remove possibly echo'ed commands. - ;; We don't have echos if nntp-open-connection-function - ;; is `nntp-open-network-stream' or `nntp-open-ssl-stream', - ;; so we skip this in that cases. + ;; We don't have echoes if `nntp-never-echoes-commands' is non-nil + ;; or the value of `nntp-open-connection-function' is in + ;; `nntp-open-connection-functions-never-echo-commands', so we + ;; skip this in that cases. (unless (or wait-for - (memq nntp-open-connection-function - '(nntp-open-network-stream nntp-open-ssl-stream))) + nntp-never-echoes-commands + (memq + nntp-open-connection-function + nntp-open-connection-functions-never-echo-commands)) (nntp-accept-response) (save-excursion (set-buffer buffer) -- 2.25.1