From: yamaoka Date: Tue, 28 Oct 2003 02:36:16 +0000 (+0000) Subject: Synch to Gnus 200310280120. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7fbf3c29bd5a2a9728d86dfd54f3621551c322f6;p=elisp%2Fgnus.git- Synch to Gnus 200310280120. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5d49c7d..27709ea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2003-10-28 Jesper Harder + + * message.el (message-forward-subject-name-subject) + (message-forward-subject-author-subject): Decode non-ASCII + newsgroup names. + (autoload): Autoload gnus-group-decoded-name. + 2003-10-27 Simon Josefsson * pgg-gpg.el (pgg-gpg-possibly-cache-passphrase): New optional diff --git a/lisp/message.el b/lisp/message.el index 288da62..77cbe7b 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -65,10 +65,11 @@ (require 'rfc822) (eval-and-compile + (autoload 'customize-save-variable "cus-edit") ;; for Mule 2. (autoload 'sha1 "sha1-el") (autoload 'gnus-find-method-for-group "gnus") (autoload 'nnvirtual-find-group-art "nnvirtual") - (autoload 'customize-save-variable "cus-edit")) ;; for Mule 2. + (autoload 'gnus-group-decoded-name "gnus-group")) (defgroup message '((user-mail-address custom-variable) (user-full-name custom-variable)) @@ -6667,31 +6668,35 @@ Previous forwarders, replyers, etc. may add it." (defvar message-forward-decoded-p nil "Non-nil means the original message is decoded.") -(defun message-forward-subject-author-subject (subject) +(defun message-forward-subject-name-subject (subject) "Generate a SUBJECT for a forwarded message. The form is: [Source] Subject, where if the original message was mail, -Source is the sender, and if the original message was news, Source is -the list of newsgroups is was posted to." +Source is the name of the sender, and if the original message was +news, Source is the list of newsgroups is was posted to." (concat "[" - (let ((prefix (message-fetch-field "newsgroups"))) - (or prefix - (and (setq prefix (message-fetch-field "from")) - (nnheader-decode-from prefix)) - "(nowhere)")) + (let ((group (message-fetch-field "newsgroups")) + from) + (if group + (gnus-group-decoded-name group) + (if (setq from (message-fetch-field "from")) + (std11-extract-address-components (nnheader-decode-from + from)) + "(nowhere)"))) "] " subject)) -(defun message-forward-subject-name-subject (subject) +(defun message-forward-subject-author-subject (subject) "Generate a SUBJECT for a forwarded message. The form is: [Source] Subject, where if the original message was mail, -Source is the name of the sender, and if the original message was -news, Source is the list of newsgroups is was posted to." +Source is the sender, and if the original message was news, Source is +the list of newsgroups is was posted to." (concat "[" - (let ((prefix (message-fetch-field "newsgroups"))) - (or prefix - (and (setq prefix (message-fetch-field "from")) - (car (std11-extract-address-components - (nnheader-decode-from prefix)))) - "(nowhere)")) + (let ((group (message-fetch-field "newsgroups")) + from) + (if group + (gnus-group-decoded-name group) + (if (setq from (message-fetch-field "from")) + (nnheader-decode-from from) + "(nowhere)"))) "] " subject)) (defun message-forward-subject-fwd (subject)