all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Cheng Gao <chenggao@gmail.com>
Subject: url/url.el - should (require 'cl) be removed?
Date: Fri, 14 Oct 2005 16:52:15 +0800	[thread overview]
Message-ID: <ur7aolbuo.fsf@news.eqiao.com> (raw)

url/url.el line 32-42:

,----
| (eval-when-compile (require 'cl))
| ;; Don't require CL at runtime if we can avoid it (Emacs 21).
| ;; Otherwise we need it for hashing functions.  `puthash' was never
| ;; defined in the Emacs 20 cl.el for some reason.
| (if (fboundp 'puthash)
|     nil					; internal or CL is loaded
|   (defalias 'puthash 'cl-puthash)
|   (autoload 'cl-puthash "cl")
|   (autoload 'gethash "cl")
|   (autoload 'maphash "cl")
|   (autoload 'make-hash-table "cl"))
`----

As it explains, (require 'cl) is for hash functions. 

But now puthash/gethash/maphash/make-hash-table are all builtins. And in
fact in cl-extra.el line 607-627:
,----
| ;;; Hash tables.
| ;; This is just kept for compatibility with code byte-compiled by Emacs-20.
| 
| ;; No idea if this might still be needed.
| (defun cl-not-hash-table (x &optional y &rest z)
|   (signal 'wrong-type-argument (list 'cl-hash-table-p (or y x))))
| 
| (defvar cl-builtin-gethash (symbol-function 'gethash))
| (defvar cl-builtin-remhash (symbol-function 'remhash))
| (defvar cl-builtin-clrhash (symbol-function 'clrhash))
| (defvar cl-builtin-maphash (symbol-function 'maphash))
| 
| (defalias 'cl-gethash 'gethash)
| (defalias 'cl-puthash 'puthash)
| (defalias 'cl-remhash 'remhash)
| (defalias 'cl-clrhash 'clrhash)
| (defalias 'cl-maphash 'maphash)
| ;; These three actually didn't exist in Emacs-20.
| (defalias 'cl-make-hash-table 'make-hash-table)
| (defalias 'cl-hash-table-p 'hash-table-p)
| (defalias 'cl-hash-table-count 'hash-table-count)
`----
cl-* ones are in fact alias of builtins.

So I guess these lines in url.el should be removed.

             reply	other threads:[~2005-10-14  8:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-14  8:52 Cheng Gao [this message]
2005-10-15 16:13 ` url/url.el - should (require 'cl) be removed? Richard M. Stallman

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=ur7aolbuo.fsf@news.eqiao.com \
    --to=chenggao@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.