From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/47185 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus always loads cl Date: Tue, 15 Oct 2002 08:41:12 +0200 Organization: University of Dortmund, Germany Sender: owner-ding@hpc.uh.edu Message-ID: <87adlgb3w7.fsf@crybaby.cs.uni-dortmund.de> References: <87u1jolt7k.fsf@crybaby.cs.uni-dortmund.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034669497 12702 80.91.224.249 (15 Oct 2002 08:11:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 15 Oct 2002 08:11:37 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 181Mnf-0003Ik-00 for ; Tue, 15 Oct 2002 10:11:36 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 181Mna-0003tw-00; Tue, 15 Oct 2002 03:11:30 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 15 Oct 2002 03:12:13 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id DAA01466 for ; Tue, 15 Oct 2002 03:11:59 -0500 (CDT) Original-Received: (qmail 24737 invoked by alias); 15 Oct 2002 08:11:09 -0000 Original-Received: (qmail 24723 invoked from network); 15 Oct 2002 08:11:08 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 15 Oct 2002 08:11:08 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 181NdL-0000Nm-00 for ; Tue, 15 Oct 2002 11:04:59 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 30 Original-NNTP-Posting-Host: crybaby.uni-duisburg.de Original-X-Trace: quimby.gnus.org 1034672699 1471 134.91.30.116 (15 Oct 2002 09:04:59 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 15 Oct 2002 09:04:59 GMT User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:aLsN++vIEESsd3uwgCZ3XoMhyB4= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:47185 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:47185 Katsumi Yamaoka writes: > (eval-and-compile > (when (= emacs-major-version 20) > ;; gethash, hash-table-count, make-hash-table, mapc > (require 'cl) > (defalias 'puthash 'cl-puthash))) I'm not so happy with this. It is better to just check whether the functions are defined, I think. Maybe something like this? (unless (fboundp 'puthash) (require 'cl) (defalias 'puthash 'cl-puthash)) In principle, it is also bad to do the defalias, but maybe in this case `puthash' is sufficiently standard so that the defalias is good anyway. Hmmm... But isn't puthash defined as a macro in cl-macs.el or cl.el, even in Emacs 20? So I'm surprised that you need the defalias. Or maybe only gethash etc are macros, and the macro is missing for puthash? In this case, please add a comment saying "alias puthash is missing from Emacs 20 cl.el" or something like that. What do you think? kai -- ~/.signature is: umop ap!sdn (Frank Nobis)