(format-seconds): Use assoc instead of assoc-string, since assoc-string doesn't exist...
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Thu, 17 Mar 2011 18:47:17 +0000 (19:47 +0100)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Thu, 17 Mar 2011 18:47:17 +0000 (19:47 +0100)
lisp/ChangeLog
lisp/time-date.el

index e4463ba..a3e0f6d 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-17  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * time-date.el (format-seconds): Use assoc instead of assoc-string,
+       since assoc-string doesn't exist in XEmacs.
+
 2011-03-17  Antoine Levitt  <antoine.levitt@gmail.com>
 
        * gnus-group.el (gnus-group-list-ticked): New function.
 2011-03-17  Antoine Levitt  <antoine.levitt@gmail.com>
 
        * gnus-group.el (gnus-group-list-ticked): New function.
index a1bfad3..3e59534 100644 (file)
@@ -308,11 +308,7 @@ This function does not work for SECONDS greater than `most-positive-fixnum'."
       (setq start (match-end 0)
             spec (match-string 1 string))
       (unless (string-equal spec "%")
       (setq start (match-end 0)
             spec (match-string 1 string))
       (unless (string-equal spec "%")
-       ;; `assoc-string' is not available in XEmacs.  So when compiling
-       ;; Gnus (`time-date.el' is part of Gnus) with XEmacs, we get
-       ;; a warning here.  But `format-seconds' is not used anywhere in
-       ;; Gnus so it's not a real problem. --rsteib
-        (or (setq match (assoc-string spec units t))
+        (or (setq match (assoc (downcase spec) units))
             (error "Bad format specifier: `%s'" spec))
         (if (assoc-string spec usedunits t)
             (error "Multiple instances of specifier: `%s'" spec))
             (error "Bad format specifier: `%s'" spec))
         (if (assoc-string spec usedunits t)
             (error "Multiple instances of specifier: `%s'" spec))