gnus-art: fix combined-lapsed with invalide date
authorJulien Danjou <julien@danjou.info>
Wed, 23 Feb 2011 15:03:14 +0000 (16:03 +0100)
committerJulien Danjou <julien@danjou.info>
Wed, 23 Feb 2011 15:03:14 +0000 (16:03 +0100)
Signed-off-by: Julien Danjou <julien@danjou.info>
lisp/ChangeLog
lisp/gnus-art.el

index b8c543b..717098d 100644 (file)
@@ -1,3 +1,9 @@
+2011-02-23  Julien Danjou  <julien@danjou.info>
+
+       * gnus-art.el (article-make-date-line): Ignore errors if time is
+       invalid and not convertible.
+       (article-make-date-line): Only add lapsed time if time is not nil.
+
 2011-02-23  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * auth-source.el (auth-source-netrc-create): Use `read-char' instead of
index 2a36c43..5b3489a 100644 (file)
@@ -3463,7 +3463,7 @@ possible values."
                             combined-lapsed))
     (error "Unknown conversion type: %s" type))
   (condition-case ()
-      (let ((time (date-to-time date)))
+      (let ((time (ignore-errors (date-to-time date))))
        (cond
         ;; Convert to the local timezone.
         ((eq type 'local)
@@ -3515,6 +3515,7 @@ possible values."
                (segments 3)
                lapsed-string)
            (while (and
+                    time
                    (setq lapsed-string
                          (concat " (" (article-lapsed-string time segments) ")"))
                    (> (+ (length date-string)