aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-02-03 08:09:03 +0000
committerGlenn Morris2009-02-03 08:09:03 +0000
commit58400e4fa88a691d4dce2eaaba2b74f103eb5045 (patch)
tree1f4184d5abbf0c060d67823c6eddcbf9511b889e
parente18cc61cc998d7c74707568db12600b2b74ab0e7 (diff)
downloademacs-58400e4fa88a691d4dce2eaaba2b74f103eb5045.tar.gz
emacs-58400e4fa88a691d4dce2eaaba2b74f103eb5045.zip
(unrmail): In the absence of Mail-from, prefer Date over current-time.
(Bug#2175)
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/mail/unrmail.el20
2 files changed, 18 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 81c7b016383..ca787cfcd2d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12009-02-03 Glenn Morris <rgm@gnu.org> 12009-02-03 Glenn Morris <rgm@gnu.org>
2 2
3 * mail/unrmail.el (unrmail): In the absence of Mail-from, prefer Date
4 over current-time. (Bug#2175)
5
3 * mail/rmail.el (rmail-convert-babyl-to-mbox): Disable undo while 6 * mail/rmail.el (rmail-convert-babyl-to-mbox): Disable undo while
4 inserting the converted mailbox. 7 inserting the converted mailbox.
5 (rmail-get-new-mail): Restore the loop over inboxes when two or more 8 (rmail-get-new-mail): Restore the loop over inboxes when two or more
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")))