From ea0e0ed4371c3d6d4141192a2c700392a221aeb4 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Wed, 16 Oct 2002 13:29:25 +0000 Subject: [PATCH] Check for the existence of hash functions instead of the Emacs version to decide whether to load cl. --- lisp/ChangeLog | 6 ++++++ lisp/spam-stat.el | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) 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))) -- 2.25.1