From 0d26bb245452fbd575620c78fccab761fa10d81e Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 12 Jan 2004 13:09:14 +0000 Subject: [PATCH] Synch to No Gnus 200401120649. --- lisp/ChangeLog | 8 ++++++++ lisp/message.el | 13 ++++++++----- lisp/rfc2047.el | 10 +++++----- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 99042af..11dd36f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ +2004-01-12 Kai Grossjohann + + * message.el (message-expand-name): Use EUDC if the user uses + that. + 2004-01-12 Jesper Harder + * rfc2047.el (rfc2047-parse-and-decode, rfc2047-decode): Use a + character for the encoding to avoid consing a string. + * rfc2047.el (rfc2047-decode-string): Don't cons a string unnecessarily. diff --git a/lisp/message.el b/lisp/message.el index c6559e4..7406385 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -7289,11 +7289,14 @@ which specify the range to operate on." :type '(alist :key-type regexp :value-type function)) (defcustom message-expand-name-function - (if (fboundp 'bbdb-complete-name) - 'bbdb-complete-name - (if (fboundp 'lsdb-complete-name) - 'lsdb-complete-name - 'expand-abbrev)) + (cond ((and (boundp 'eudc-protocol) + eudc-protocol) + 'eudc-expand-inline) + ((fboundp 'bbdb-complete-name) + 'bbdb-complete-name) + ((fboundp 'lsdb-complete-name) + 'lsdb-complete-name) + (t 'expand-abbrev)) "*A function called to expand addresses in field body." :group 'message :type 'function) diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index 6b8343c..45ad717 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -694,7 +694,7 @@ decodable." (condition-case nil (rfc2047-decode (match-string 1 word) - (upcase (match-string 2 word)) + (string-to-char (match-string 2 word)) (match-string 3 word)) (error word)) word))) ; un-decodable @@ -712,7 +712,7 @@ decodable." (defun rfc2047-decode (charset encoding string) "Decode STRING from the given MIME CHARSET in the given ENCODING. -Valid ENCODINGs are \"B\" and \"Q\". +Valid ENCODINGs are the characters \"B\" and \"Q\". If your Emacs implementation can't decode CHARSET, return nil." (if (stringp charset) (setq charset (intern (downcase charset)))) @@ -732,13 +732,13 @@ If your Emacs implementation can't decode CHARSET, return nil." (setq cs mail-parse-charset)) (mm-decode-coding-string (cond - ((equal "B" encoding) + ((char-equal ?B encoding) (base64-decode-string (rfc2047-pad-base64 string))) - ((equal "Q" encoding) + ((char-equal ?Q encoding) (quoted-printable-decode-string (mm-subst-char-in-string ?_ ? string t))) - (t (error "Invalid encoding: %s" encoding))) + (t (error "Invalid encoding: %c" encoding))) cs)))) (provide 'rfc2047) -- 1.7.10.4