diff options
| author | Glenn Morris | 2009-02-18 04:34:43 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-02-18 04:34:43 +0000 |
| commit | 7b692c10628986c9d4ccd504d70ef78a4b1d02cb (patch) | |
| tree | 8c65d90f55749c78115ea0f5dfa1329f6017440b | |
| parent | 6aa7fc5b9285a78e72d0acf2525b8206de629ea4 (diff) | |
| download | emacs-7b692c10628986c9d4ccd504d70ef78a4b1d02cb.tar.gz emacs-7b692c10628986c9d4ccd504d70ef78a4b1d02cb.zip | |
(unrmail): Use mail-mbox-from.
| -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'." | |||
| 43 | (message "Done") | 43 | (message "Done") |
| 44 | (kill-emacs (if error 1 0)))) | 44 | (kill-emacs (if error 1 0)))) |
| 45 | 45 | ||
| 46 | (declare-function mail-strip-quoted-names "mail-utils" (address)) | 46 | (declare-function mail-mbox-from "mail-utils" ()) |
| 47 | (defvar rmime-magic-string) ; in rmime.el, if you have it | 47 | (defvar rmime-magic-string) ; in rmime.el, if you have it |
| 48 | 48 | ||
| 49 | ;;;###autoload | 49 | ;;;###autoload |
| @@ -191,22 +191,8 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." | |||
| 191 | (save-excursion (search-forward "\n\n" nil 'move) (point))) | 191 | (save-excursion (search-forward "\n\n" nil 'move) (point))) |
| 192 | 192 | ||
| 193 | ;; Fetch or construct what we should use in the `From ' line. | 193 | ;; Fetch or construct what we should use in the `From ' line. |
| 194 | (setq mail-from | 194 | (setq mail-from (or (mail-fetch-field "Mail-From") |
| 195 | (or (mail-fetch-field "Mail-From") | 195 | (mail-mbox-from))) |
| 196 | (concat "From " | ||
| 197 | (mail-strip-quoted-names | ||
| 198 | (or (mail-fetch-field "from") | ||
| 199 | (mail-fetch-field "really-from") | ||
| 200 | (mail-fetch-field "sender") | ||
| 201 | "unknown")) | ||
| 202 | " " | ||
| 203 | (let ((date (mail-fetch-field "date"))) | ||
| 204 | (or | ||
| 205 | (and date | ||
| 206 | (ignore-errors | ||
| 207 | (current-time-string | ||
| 208 | (date-to-time date)))) | ||
| 209 | (current-time-string)))))) | ||
| 210 | 196 | ||
| 211 | ;; If the message specifies a coding system, use it. | 197 | ;; If the message specifies a coding system, use it. |
| 212 | (let ((maybe-coding (mail-fetch-field "X-Coding-System"))) | 198 | (let ((maybe-coding (mail-fetch-field "X-Coding-System"))) |