From: Katsumi Yamaoka Date: Wed, 16 Oct 2002 13:29:25 +0000 (+0000) Subject: Check for the existence of hash functions instead of the Emacs version to X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=ea0e0ed4371c3d6d4141192a2c700392a221aeb4;hp=012fd392f1ff92665d2d34632bb9659362cc3b9e Check for the existence of hash functions instead of the Emacs version to decide whether to load cl. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3dc6e7de1..e995b1b62 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2002-10-16 Katsumi Yamaoka + + * 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,A_(Bjohann. + 2002-10-15 Kai Gro,A_(Bjohann * gnus-agent.el (gnus-agent-fetch-selected-article): Open history diff --git a/lisp/spam-stat.el b/lisp/spam-stat.el index 967c94834..0a0fcf923 100644 --- a/lisp/spam-stat.el +++ b/lisp/spam-stat.el @@ -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)))