diff options
author | Glenn Morris <rgm@gnu.org> | 2009-02-18 04:34:43 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2009-02-18 04:34:43 +0000 |
commit | 7b692c10628986c9d4ccd504d70ef78a4b1d02cb (patch) | |
tree | 8c65d90f55749c78115ea0f5dfa1329f6017440b /lisp/mail/unrmail.el | |
parent | 6aa7fc5b9285a78e72d0acf2525b8206de629ea4 (diff) | |
download | emacs-7b692c10628986c9d4ccd504d70ef78a4b1d02cb.tar.gz |
(unrmail): Use mail-mbox-from.
Diffstat (limited to 'lisp/mail/unrmail.el')
-rw-r--r-- | lisp/mail/unrmail.el | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el index 86957813e1e..bb73b82c9ef 100644 --- a/lisp/mail/unrmail.el +++ b/lisp/mail/unrmail.el @@ -43,7 +43,7 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." (message "Done") (kill-emacs (if error 1 0)))) -(declare-function mail-strip-quoted-names "mail-utils" (address)) +(declare-function mail-mbox-from "mail-utils" ()) (defvar rmime-magic-string) ; in rmime.el, if you have it ;;;###autoload @@ -191,22 +191,8 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." (save-excursion (search-forward "\n\n" nil 'move) (point))) ;; Fetch or construct what we should use in the `From ' line. - (setq mail-from - (or (mail-fetch-field "Mail-From") - (concat "From " - (mail-strip-quoted-names - (or (mail-fetch-field "from") - (mail-fetch-field "really-from") - (mail-fetch-field "sender") - "unknown")) - " " - (let ((date (mail-fetch-field "date"))) - (or - (and date - (ignore-errors - (current-time-string - (date-to-time date)))) - (current-time-string)))))) + (setq mail-from (or (mail-fetch-field "Mail-From") + (mail-mbox-from))) ;; If the message specifies a coding system, use it. (let ((maybe-coding (mail-fetch-field "X-Coding-System"))) |