changeset 96708:ceb7b0d5c55f

(cl-do-pop, cl-mapcar-many): Declare for compiler. (cl-hack-byte-compiler): Load cl-macs and run cl-hack-bytecomp-hook directly. Provide cl before loading cl-macs.
author Glenn Morris <rgm@gnu.org>
date Wed, 16 Jul 2008 02:49:35 +0000
parents e2bc3521cdab
children ca40084f11a0
files lisp/emacs-lisp/cl.el
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/cl.el	Wed Jul 16 02:46:09 2008 +0000
+++ b/lisp/emacs-lisp/cl.el	Wed Jul 16 02:49:35 2008 +0000
@@ -133,6 +133,9 @@
       (list 'setq place (if x (list '- place x) (list '1- place)))
     (list 'callf '- place (or x 1))))
 
+;; Autoloaded, but we haven't loaded cl-loaddefs yet.
+(declare-function cl-do-pop "cl-macs" (place))
+
 (defmacro pop (place)
   "Remove and return the head of the list stored in PLACE.
 Analogous to (prog1 (car PLACE) (setf PLACE (cdr PLACE))), though more
@@ -338,6 +341,8 @@
 
 (defalias 'copy-seq 'copy-sequence)
 
+(declare-function cl-mapcar-many "cl-extra" (cl-func cl-seqs))
+
 (defun mapcar* (cl-func cl-x &rest cl-rest)
   "Apply FUNCTION to each element of SEQ, and make a list of the results.
 If there are several SEQs, FUNCTION is called with that many arguments,
@@ -632,17 +637,17 @@
 
 ;; 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.
-;; 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.
+  (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)