Check for the existence of hash functions instead of the Emacs version to
authorKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 16 Oct 2002 13:29:25 +0000 (13:29 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 16 Oct 2002 13:29:25 +0000 (13:29 +0000)
decide whether to load cl.

lisp/ChangeLog
lisp/spam-stat.el

index 3dc6e7d..e995b1b 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-16  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * spam-stat.el: Check for the existence of hash functions instead
+       of the Emacs version to decide whether to load cl.  Suggested by
+       Kai Gro\e,A_\e(Bjohann.
+
 2002-10-15  Kai Gro\e,A_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
        * gnus-agent.el (gnus-agent-fetch-selected-article): Open history
index 967c948..0a0fcf9 100644 (file)
@@ -180,11 +180,11 @@ This is set by hooking into Gnus.")
 
 ;; Functions missing in Emacs 20
 
-(eval-and-compile
-  (when (and (not (featurep 'xemacs))
-            (= emacs-major-version 20))
-    ;; gethash, hash-table-count, make-hash-table, mapc
-    (require 'cl)
+(when (memq nil (mapcar 'fboundp
+                       '(gethash hash-table-count make-hash-table
+                                 mapc puthash)))
+  (require 'cl)
+  (unless (fboundp 'puthash)
     ;; alias puthash is missing from Emacs 20 cl-extra.el
     (defalias 'puthash 'cl-puthash)))