diff options
author | Glenn Morris <rgm@gnu.org> | 2008-07-16 02:49:35 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2008-07-16 02:49:35 +0000 |
commit | 7467c796a1665599f9f264f08989e7838400e976 (patch) | |
tree | c71b513a55287afbe3a6c4d32949c3bfdc6488cf /lisp/emacs-lisp/cl.el | |
parent | 38f4308d1b3c38ac4d1c5c5b1acb610a66e15d24 (diff) | |
download | emacs-7467c796a1665599f9f264f08989e7838400e976.tar.gz |
(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.
Diffstat (limited to 'lisp/emacs-lisp/cl.el')
-rw-r--r-- | lisp/emacs-lisp/cl.el | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index c03c91d76fa..d757d60b3da 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -133,6 +133,9 @@ The return value is the decremented value of PLACE." (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 @@ always returns nil." (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 @@ If ALIST is non-nil, the new pairs are prepended to it." ;; 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) |