diff options
| author | Glenn Morris | 2009-02-03 08:09:03 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-02-03 08:09:03 +0000 |
| commit | 58400e4fa88a691d4dce2eaaba2b74f103eb5045 (patch) | |
| tree | 1f4184d5abbf0c060d67823c6eddcbf9511b889e /lisp/mail | |
| parent | e18cc61cc998d7c74707568db12600b2b74ab0e7 (diff) | |
| download | emacs-58400e4fa88a691d4dce2eaaba2b74f103eb5045.tar.gz emacs-58400e4fa88a691d4dce2eaaba2b74f103eb5045.zip | |
(unrmail): In the absence of Mail-from, prefer Date over current-time.
(Bug#2175)
Diffstat (limited to 'lisp/mail')
| -rw-r--r-- | lisp/mail/unrmail.el | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el index 9d1717368bd..8fb15f1813c 100644 --- a/lisp/mail/unrmail.el +++ b/lisp/mail/unrmail.el | |||
| @@ -184,11 +184,21 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." | |||
| 184 | (setq mail-from | 184 | (setq mail-from |
| 185 | (or (mail-fetch-field "Mail-From") | 185 | (or (mail-fetch-field "Mail-From") |
| 186 | (concat "From " | 186 | (concat "From " |
| 187 | (mail-strip-quoted-names (or (mail-fetch-field "from") | 187 | (mail-strip-quoted-names |
| 188 | (mail-fetch-field "really-from") | 188 | (or (mail-fetch-field "from") |
| 189 | (mail-fetch-field "sender") | 189 | (mail-fetch-field "really-from") |
| 190 | "unknown")) | 190 | (mail-fetch-field "sender") |
| 191 | " " (current-time-string)))) | 191 | "unknown")) |
| 192 | " " | ||
| 193 | (let ((date (mail-fetch-field "date"))) | ||
| 194 | (or | ||
| 195 | (and date | ||
| 196 | (setq date | ||
| 197 | (ignore-errors | ||
| 198 | (format-time-string | ||
| 199 | "%a %b %e %T %Y" | ||
| 200 | (date-to-time date))))) | ||
| 201 | (current-time-string)))))) | ||
| 192 | 202 | ||
| 193 | ;; If the message specifies a coding system, use it. | 203 | ;; If the message specifies a coding system, use it. |
| 194 | (let ((maybe-coding (mail-fetch-field "X-Coding-System"))) | 204 | (let ((maybe-coding (mail-fetch-field "X-Coding-System"))) |