+2004-01-12 Kai Grossjohann <kai.grossjohann@mci.com>
+
+ * message.el (message-expand-name): Use EUDC if the user uses
+ that.
+
2004-01-12 Jesper Harder <harder@ifa.au.dk>
+ * 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.
: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)
(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
(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))))
(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)