From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: emacs-lisp/cl-*.el and requirement of cl Date: Thu, 03 Jul 2008 17:30:42 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1215120686 1727 80.91.229.12 (3 Jul 2008 21:31:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Jul 2008 21:31:26 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 03 23:32:12 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KEWPR-0007VX-IN for ged-emacs-devel@m.gmane.org; Thu, 03 Jul 2008 23:32:09 +0200 Original-Received: from localhost ([127.0.0.1]:37712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KEWOa-0002O9-ME for ged-emacs-devel@m.gmane.org; Thu, 03 Jul 2008 17:31:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KEWOU-0002Nd-G3 for emacs-devel@gnu.org; Thu, 03 Jul 2008 17:31:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KEWOT-0002MU-2E for emacs-devel@gnu.org; Thu, 03 Jul 2008 17:31:09 -0400 Original-Received: from [199.232.76.173] (port=52315 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KEWOS-0002Lp-Ix for emacs-devel@gnu.org; Thu, 03 Jul 2008 17:31:08 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:33164) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KEWOL-0004b4-EO for emacs-devel@gnu.org; Thu, 03 Jul 2008 17:31:08 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KEWO2-0004eC-LS; Thu, 03 Jul 2008 17:30:42 -0400 X-Spook: Ron Brown Ft. Knox top secret Rand Corporation Bin Laden X-Ran: UYJn4'T3/(C)E"I,3ECirJZ:mB^(\'-&v{`qVyyzVyi9+MQV}d92r"@U<,RLctM_~+y)IZ X-Hue: black X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:100308 Archived-At: Does anyone know why emacs-lisp/cl-compat.el does this: ;; Require at load-time, but not when compiling cl-compat. (or (featurep 'cl) (require 'cl)) rather than just a simple "(require 'cl)"? Similarly, cl-macs and cl-seq throw errors if loaded without cl being loaded first. Is there any reason not to just make them require cl? I know just doing it naively can lead to a recursive require, but that is easily worked around, eg: *** cl.el 12 May 2008 01:45:41 -0000 1.63 --- cl.el 3 Jul 2008 21:29:27 -0000 *************** *** 632,648 **** ;; This goes here so that cl-macs can find it if it loads right now. (provide 'cl-19) ; usage: (require 'cl-19 "cl") ;; Things to do after byte-compiler is loaded. - ;; As a side effect, we cause cl-macs to be loaded when compiling, so - ;; that the compiler-macros defined there will be present. (defvar cl-hacked-flag nil) (defun cl-hack-byte-compiler () ! (if (and (not cl-hacked-flag) (fboundp 'byte-compile-file-form)) ! (progn ! (setq cl-hacked-flag t) ; Do it first, to prevent recursion. ! (cl-compile-time-init)))) ; In cl-macs.el. ;; Try it now in case the compiler has already been loaded. (cl-hack-byte-compiler) --- 632,648 ---- ;; This goes here so that cl-macs can find it if it loads right now. (provide 'cl-19) ; usage: (require 'cl-19 "cl") + (provide 'cl) ;; Things to do after byte-compiler is loaded. (defvar cl-hacked-flag nil) (defun cl-hack-byte-compiler () ! (and (not cl-hacked-flag) (fboundp 'byte-compile-file-form) ! (progn ! (setq cl-hacked-flag t) ; Do it first, to prevent recursion. ! (load "cl-macs" nil t) ! (run-hooks 'cl-hack-bytecomp-hook)))) ;; Try it now in case the compiler has already been loaded. (cl-hack-byte-compiler)