(gnus-request-marks): Call *-request-marks instead of the older request-update-info.
[gnus] / lisp / gnus-util.el
index 45fd26c..d298c71 100644 (file)
@@ -1,7 +1,6 @@
 ;;; gnus-util.el --- utility functions for Gnus
 
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2011 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -39,6 +38,8 @@
 (eval-when-compile
   (require 'cl))
 
+(require 'time-date)
+
 (defcustom gnus-completing-read-function 'gnus-emacs-completing-read
   "Function use to do completing read."
   :version "24.1"
@@ -332,10 +333,11 @@ Symbols are also allowed; their print names are used instead."
        (and (= (car fdate) (car date))
             (> (nth 1 fdate) (nth 1 date))))))
 
+;; Every version of Emacs Gnus supports has built-in float-time.
+;; The featurep test silences an irritating compiler warning.
 (eval-and-compile
   (if (or (featurep 'emacs)
-         (and (fboundp 'float-time)
-              (subrp (symbol-function 'float-time))))
+         (fboundp 'float-time))
       (defalias 'gnus-float-time 'float-time)
     (defun gnus-float-time (&optional time)
       "Convert time value TIME to a floating point number.
@@ -2037,25 +2039,26 @@ Same as `string-match' except this function does not change the match data."
     (save-match-data
       (string-match regexp string start))))
 
-(if (fboundp 'macroexpand-all)
-    (defalias 'gnus-macroexpand-all 'macroexpand-all)
-  (defun gnus-macroexpand-all (form &optional environment)
-    "Return result of expanding macros at all levels in FORM.
+(eval-and-compile
+  (if (fboundp 'macroexpand-all)
+      (defalias 'gnus-macroexpand-all 'macroexpand-all)
+    (defun gnus-macroexpand-all (form &optional environment)
+      "Return result of expanding macros at all levels in FORM.
 If no macros are expanded, FORM is returned unchanged.
 The second optional arg ENVIRONMENT specifies an environment of macro
 definitions to shadow the loaded ones for use in file byte-compilation."
-    (if (consp form)
-       (let ((idx 1)
-             (len (length (setq form (copy-sequence form))))
-             expanded)
-         (while (< idx len)
-           (setcar (nthcdr idx form) (gnus-macroexpand-all (nth idx form)
-                                                           environment))
-           (setq idx (1+ idx)))
-         (if (eq (setq expanded (macroexpand form environment)) form)
-             form
-           (gnus-macroexpand-all expanded environment)))
-      form)))
+      (if (consp form)
+         (let ((idx 1)
+               (len (length (setq form (copy-sequence form))))
+               expanded)
+           (while (< idx len)
+             (setcar (nthcdr idx form) (gnus-macroexpand-all (nth idx form)
+                                                             environment))
+             (setq idx (1+ idx)))
+           (if (eq (setq expanded (macroexpand form environment)) form)
+               form
+             (gnus-macroexpand-all expanded environment)))
+       form))))
 
 (provide 'gnus-util)