Gnus development mailing list
 help / color / mirror / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Subject: Re: Gnus always loads cl
Date: Tue, 15 Oct 2002 08:41:12 +0200	[thread overview]
Message-ID: <87adlgb3w7.fsf@crybaby.cs.uni-dortmund.de> (raw)
In-Reply-To: <yotllm508wqe.fsf@jpl.org>

Katsumi Yamaoka <yamaoka@jpl.org> 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)



  reply	other threads:[~2002-10-15  6:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-08 11:24 Katsumi Yamaoka
2002-10-10 11:12 ` Katsumi Yamaoka
2002-10-14  9:15   ` Katsumi Yamaoka
2002-10-14 19:24     ` Kai Großjohann
2002-10-14 22:46       ` Katsumi Yamaoka
2002-10-15  6:41         ` Kai Großjohann [this message]
2002-10-15  9:29           ` Katsumi Yamaoka
2002-10-15 13:54             ` Kai Großjohann
2002-10-15 15:46               ` Katsumi
2002-10-15 19:27                 ` Kai Großjohann
2002-10-16 12:11                   ` Katsumi Yamaoka
2002-10-15 21:34             ` Alex Schroeder
2002-12-29  0:18     ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87adlgb3w7.fsf@crybaby.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).