diff lisp/calendar/time-date.el @ 100993:a16e9f7c2536

Merge from gnus--devo--0 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1513
author Miles Bader <miles@gnu.org>
date Fri, 09 Jan 2009 03:01:50 +0000
parents a9dc0e7c3f2b
children b04b1ea82ee0
line wrap: on
line diff
--- a/lisp/calendar/time-date.el	Fri Jan 09 02:59:52 2009 +0000
+++ b/lisp/calendar/time-date.el	Fri Jan 09 03:01:50 2009 +0000
@@ -39,6 +39,9 @@
 
 ;;; Code:
 
+;; Only necessary for `declare' when compiling Gnus with Emacs 21.
+(eval-when-compile (require 'cl))
+
 (defmacro with-decoded-time-value (varlist &rest body)
   "Decode a time value and bind it according to VARLIST, then eval BODY.
 
@@ -290,6 +293,10 @@
       (setq start (match-end 0)
             spec (match-string 1 string))
       (unless (string-equal spec "%")
+	;; `assoc-string' is not available in Emacs 21.  So when compiling
+	;; Gnus (`time-date.el' is part of Gnus) with Emacs 21, 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))
             (error "Bad format specifier: `%s'" spec))
         (if (assoc-string spec usedunits t)