# HG changeset patch # User Glenn Morris # Date 1216176575 0 # Node ID ceb7b0d5c55ff74d18f83ba091d5cc7b2f9057be # Parent e2bc3521cdab41d11de28ace26fb06ba120b3a56 (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. diff -r e2bc3521cdab -r ceb7b0d5c55f lisp/emacs-lisp/cl.el --- 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)