]> git.eshelyaron.com Git - emacs.git/commitdiff
Synch with Gnus trunk.
authorRomain Francoise <romain@orebokech.com>
Sat, 12 Jun 2010 17:26:40 +0000 (19:26 +0200)
committerRomain Francoise <romain@orebokech.com>
Sat, 12 Jun 2010 17:26:40 +0000 (19:26 +0200)
* gnus-util.el (gnus-date-get-time): Move up before first use.

lisp/gnus/ChangeLog
lisp/gnus/gnus-util.el

index 30743d11289b574b274cf21f8e18a51a123639ff..78d3d2342852ddbbd93ae6531b04a60eee5bc857 100644 (file)
@@ -1,3 +1,7 @@
+2010-06-12  Romain Francoise  <romain@orebokech.com>
+
+       * gnus-util.el (gnus-date-get-time): Move up before first use.
+
 2010-06-10  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-mime-buttonized-part-id): New internal variable.
index 3045f72daeb8a7c9c3f15229eae539ded4a377f9..b8a1c266c936d8dde46350d8c497d77a7ef69fb3 100644 (file)
@@ -429,6 +429,20 @@ TIME defaults to the current time."
     (+ (car now) (* (car (cdr now)) 60) (* (car (nthcdr 2 now)) 3600)
        (* (- (string-to-number days) 1) 3600 24))))
 
+(defmacro gnus-date-get-time (date)
+  "Convert DATE string to Emacs time.
+Cache the result as a text property stored in DATE."
+  ;; Either return the cached value...
+  `(let ((d ,date))
+     (if (equal "" d)
+        '(0 0)
+       (or (get-text-property 0 'gnus-time d)
+          ;; or compute the value...
+          (let ((time (safe-date-to-time d)))
+            ;; and store it back in the string.
+            (put-text-property 0 1 'gnus-time time d)
+            time)))))
+
 (defvar gnus-user-date-format-alist
   '(((gnus-seconds-today) . "%k:%M")
     (604800 . "%a %k:%M")                   ;;that's one week
@@ -480,20 +494,6 @@ Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"."
       (format-time-string "%d-%b" (gnus-date-get-time messy-date))
     (error "  -   ")))
 
-(defmacro gnus-date-get-time (date)
-  "Convert DATE string to Emacs time.
-Cache the result as a text property stored in DATE."
-  ;; Either return the cached value...
-  `(let ((d ,date))
-     (if (equal "" d)
-        '(0 0)
-       (or (get-text-property 0 'gnus-time d)
-          ;; or compute the value...
-          (let ((time (safe-date-to-time d)))
-            ;; and store it back in the string.
-            (put-text-property 0 1 'gnus-time time d)
-            time)))))
-
 (defsubst gnus-time-iso8601 (time)
   "Return a string of TIME in YYYYMMDDTHHMMSS format."
   (format-time-string "%Y%m%dT%H%M%S" time))