# HG changeset patch # User Glenn Morris # Date 1234931683 0 # Node ID d5ecb9cfd7cb9928ef03b367b262e7af0d81ceda # Parent edc57b1b19f02e9fce9181cf9480bbd183bccd2f (unrmail): Use mail-mbox-from. diff -r edc57b1b19f0 -r d5ecb9cfd7cb lisp/mail/unrmail.el --- a/lisp/mail/unrmail.el Wed Feb 18 04:34:24 2009 +0000 +++ b/lisp/mail/unrmail.el Wed Feb 18 04:34:43 2009 +0000 @@ -43,7 +43,7 @@ (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 @@ (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")))