From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cheng Gao Newsgroups: gmane.emacs.devel Subject: url/url.el - should (require 'cl) be removed? Date: Fri, 14 Oct 2005 16:52:15 +0800 Organization: eqiao.com Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: sea.gmane.org 1129283663 27707 80.91.229.2 (14 Oct 2005 09:54:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Oct 2005 09:54:23 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 14 11:54:14 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EQMFT-0000Y7-09 for ged-emacs-devel@m.gmane.org; Fri, 14 Oct 2005 11:53:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EQMFS-0003LG-CG for ged-emacs-devel@m.gmane.org; Fri, 14 Oct 2005 05:53:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EQLZP-0003Q0-RZ for emacs-devel@gnu.org; Fri, 14 Oct 2005 05:09:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EQLUv-0003I9-6T for emacs-devel@gnu.org; Fri, 14 Oct 2005 05:05:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EQLKQ-00031y-HD for emacs-devel@gnu.org; Fri, 14 Oct 2005 04:54:19 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EQLKP-00023I-Rd for emacs-devel@gnu.org; Fri, 14 Oct 2005 04:54:14 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EQLId-0007yz-Ee for emacs-devel@gnu.org; Fri, 14 Oct 2005 10:52:23 +0200 Original-Received: from 218.94.151.195 ([218.94.151.195]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Oct 2005 10:52:23 +0200 Original-Received: from chenggao by 218.94.151.195 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Oct 2005 10:52:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 46 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 218.94.151.195 User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (windows-nt) Cancel-Lock: sha1:rM2ASjv+t6iSBqDZnT28efcW98U= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:44021 Archived-At: 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.