all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* url/url.el - should (require 'cl) be removed?
@ 2005-10-14  8:52 Cheng Gao
  2005-10-15 16:13 ` Richard M. Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Cheng Gao @ 2005-10-14  8:52 UTC (permalink / 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: url/url.el - should (require 'cl) be removed?
  2005-10-14  8:52 url/url.el - should (require 'cl) be removed? Cheng Gao
@ 2005-10-15 16:13 ` Richard M. Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard M. Stallman @ 2005-10-15 16:13 UTC (permalink / raw)
  Cc: emacs-devel

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

I deleted them.  Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-15 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-14  8:52 url/url.el - should (require 'cl) be removed? Cheng Gao
2005-10-15 16:13 ` Richard M. Stallman

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.