]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from gnus--rel--5.10
authorMiles Bader <miles@gnu.org>
Thu, 1 Mar 2007 23:41:53 +0000 (23:41 +0000)
committerMiles Bader <miles@gnu.org>
Thu, 1 Mar 2007 23:41:53 +0000 (23:41 +0000)
Patches applied:

 * gnus--rel--5.10  (patch 203-205)

   - Merge from emacs--devo--0
   - Update from CVS

2007-02-28  Katsumi Yamaoka  <yamaoka@jpl.org>

   * lisp/gnus/message.el (message-make-in-reply-to): Quote name containing
   non-ASCII characters.  It will make the RFC2047 encoder cause an error
   if there are special characters.  Reported by NAKAJI Hiroyuki
   <nakaji@kankyo-u.ac.jp>.

2007-02-27  Katsumi Yamaoka  <yamaoka@jpl.org>

   * lisp/gnus/nntp.el (nntp-never-echoes-commands)
   (nntp-open-connection-functions-never-echo-commands): New variables.
   (nntp-send-command): Use them.

2007-02-27  Katsumi Yamaoka  <yamaoka@jpl.org>

   * man/gnus.texi (NNTP): Mention nntp-never-echoes-commands and
   nntp-open-connection-functions-never-echo-commands.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-658

lisp/gnus/ChangeLog
lisp/gnus/message.el
lisp/gnus/nntp.el
man/ChangeLog
man/gnus.texi

index c6205eac0ce2e4dc001ec39aee7d80e45b92ebbe..d3354bd14eb24af2d06cdae6cd2c92fc03747af1 100644 (file)
@@ -1,3 +1,16 @@
+2007-02-28  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * message.el (message-make-in-reply-to): Quote name containing
+       non-ASCII characters.  It will make the RFC2047 encoder cause an error
+       if there are special characters.  Reported by NAKAJI Hiroyuki
+       <nakaji@kankyo-u.ac.jp>.
+
+2007-02-27  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * nntp.el (nntp-never-echoes-commands)
+       (nntp-open-connection-functions-never-echo-commands): New variables.
+       (nntp-send-command): Use them.
+
 2007-02-15  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
 
        * nnweb.el (nnweb-google-parse-1): Fix date parsing to also match on
index 0f9046756e10098539fdd81889c026760e0bc5d5..55a7653dba110ef4e4a72646c8487ced820d59a7 100644 (file)
@@ -4864,13 +4864,32 @@ If NOW, use that time instead."
          (msg-id (mail-header-message-id message-reply-headers)))
       (when from
        (let ((name (mail-extract-address-components from)))
-         (concat msg-id (if msg-id " (")
-                 (or (car name)
-                     (nth 1 name))
-                 "'s message of \""
-                 (if (or (not date) (string= date ""))
-                     "(unknown date)" date)
-                 "\"" (if msg-id ")")))))))
+         (concat
+          msg-id (if msg-id " (")
+          (if (car name)
+              (if (string-match "[^\000-\177]" (car name))
+                  ;; Quote a string containing non-ASCII characters.
+                  ;; It will make the RFC2047 encoder cause an error
+                  ;; if there are special characters.
+                  (let ((default-enable-multibyte-characters t))
+                    (with-temp-buffer
+                      (insert (car name))
+                      (goto-char (point-min))
+                      (while (search-forward "\"" nil t)
+                        (when (prog2
+                                  (backward-char)
+                                  (zerop (% (skip-chars-backward "\\\\") 2))
+                                (goto-char (match-beginning 0)))
+                          (insert "\\"))
+                        (forward-char))
+                      ;; Those quotes will be removed by the RFC2047 encoder.
+                      (concat "\"" (buffer-string) "\"")))
+                (car name))
+            (nth 1 name))
+          "'s message of \""
+          (if (or (not date) (string= date ""))
+              "(unknown date)" date)
+          "\"" (if msg-id ")")))))))
 
 (defun message-make-distribution ()
   "Make a Distribution header."
index 867ea5419f2bccf63e90c85b528ff5c3eb1a2fc1..25b924a93e7b893fb6ba7b838092c3b1d0aa4015 100644 (file)
@@ -88,6 +88,21 @@ Indirect connections:
 - `nntp-open-via-rlogin-and-telnet',
 - `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.")
@@ -450,11 +465,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', so we skip this in that case.
+         ;; 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
-                     (equal nntp-open-connection-function
-                            'nntp-open-network-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)
index c7e3da8bdddd0b33391326471c007b2de1e3511c..ad357f99680fd5c2f8376404578d680453e35334 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-27  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus.texi (NNTP): Mention nntp-never-echoes-commands and
+       nntp-open-connection-functions-never-echo-commands.
+
 2007-02-28  Thien-Thi Nguyen  <ttn@gnu.org>
 
        * rmail.texi (Movemail): Add internal ref.
index 625549890ae9875daab38c91178f57272693acb9..e2adfae22539db044ae7fa141a1dc6a78b138b23 100644 (file)
@@ -12942,6 +12942,24 @@ Six pre-made functions are supplied.  These functions can be grouped in
 two categories: direct connection functions (four pre-made), and
 indirect ones (two pre-made).
 
+@item nntp-never-echoes-commands
+@vindex nntp-never-echoes-commands
+Non-@code{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-@code{nil} in the method for such a server setting
+@code{nntp-open-connection-function} to @code{nntp-open-ssl-stream} for
+example.  The default value is @code{nil}.  Note that the
+@code{nntp-open-connection-functions-never-echo-commands} variable
+overrides the @code{nil} value of this variable.
+
+@item nntp-open-connection-functions-never-echo-commands
+@vindex nntp-open-connection-functions-never-echo-commands
+List of functions that never echo commands.  Add or set a function which
+you set to @code{nntp-open-connection-function} to this list if it does
+not echo commands.  Note that a non-@code{nil} value of the
+@code{nntp-never-echoes-commands} variable overrides this variable.  The
+default value is @code{(nntp-open-network-stream)}.
+
 @item nntp-prepare-post-hook
 @vindex nntp-prepare-post-hook
 A hook run just before posting an article.  If there is no