emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog mail/unrmail.el


From: Glenn Morris
Subject: [Emacs-diffs] emacs/lisp ChangeLog mail/unrmail.el
Date: Tue, 03 Feb 2009 08:09:06 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       09/02/03 08:09:06

Modified files:
        lisp           : ChangeLog 
        lisp/mail      : unrmail.el 

Log message:
        (unrmail): In the absence of Mail-from, prefer Date over current-time.
        (Bug#2175)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15248&r2=1.15249
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/unrmail.el?cvsroot=emacs&r1=1.30&r2=1.31

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15248
retrieving revision 1.15249
diff -u -b -r1.15248 -r1.15249
--- ChangeLog   3 Feb 2009 04:09:01 -0000       1.15248
+++ ChangeLog   3 Feb 2009 08:09:03 -0000       1.15249
@@ -1,5 +1,8 @@
 2009-02-03  Glenn Morris  <address@hidden>
 
+       * mail/unrmail.el (unrmail): In the absence of Mail-from, prefer Date
+       over current-time.  (Bug#2175)
+
        * mail/rmail.el (rmail-convert-babyl-to-mbox): Disable undo while
        inserting the converted mailbox.
        (rmail-get-new-mail): Restore the loop over inboxes when two or more

Index: mail/unrmail.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mail/unrmail.el,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- mail/unrmail.el     31 Jan 2009 14:32:36 -0000      1.30
+++ mail/unrmail.el     3 Feb 2009 08:09:06 -0000       1.31
@@ -184,11 +184,21 @@
              (setq mail-from
                    (or (mail-fetch-field "Mail-From")
                        (concat "From "
-                               (mail-strip-quoted-names (or (mail-fetch-field 
"from")
+                               (mail-strip-quoted-names
+                                (or (mail-fetch-field "from")
                                                             (mail-fetch-field 
"really-from")
                                                             (mail-fetch-field 
"sender")
                                                             "unknown"))
-                               " " (current-time-string))))
+                               "  "
+                               (let ((date (mail-fetch-field "date")))
+                                 (or
+                                  (and date
+                                       (setq date
+                                             (ignore-errors
+                                              (format-time-string
+                                               "%a %b %e %T %Y"
+                                               (date-to-time date)))))
+                                  (current-time-string))))))
 
              ;; If the message specifies a coding system, use it.
              (let ((maybe-coding (mail-fetch-field "X-Coding-System")))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]