aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/cl.el50
2 files changed, 30 insertions, 25 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c9ece986c5c..56987cff8e7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/cl.el: Set edebug and indentation before loading
4 cl-loaddefs.el so that its use of dolist doesn't load cl-macs.
5
12007-06-28 Andreas Schwab <schwab@suse.de> 62007-06-28 Andreas Schwab <schwab@suse.de>
2 7
3 * Makefile.in ($(lisp)/mh-e/mh-loaddefs.el): Depend on 8 * Makefile.in ($(lisp)/mh-e/mh-loaddefs.el): Depend on
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index 41dc4432b3f..233df65ac91 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -113,8 +113,9 @@ a future Emacs interpreter will be able to use it.")
113(defun cl-cannot-unload () 113(defun cl-cannot-unload ()
114 (error "Cannot unload the feature `cl'")) 114 (error "Cannot unload the feature `cl'"))
115 115
116;;; Generalized variables. These macros are defined here so that they 116;;; Generalized variables.
117;;; can safely be used in .emacs files. 117;; These macros are defined here so that they
118;; can safely be used in .emacs files.
118 119
119(defmacro incf (place &optional x) 120(defmacro incf (place &optional x)
120 "Increment PLACE by X (1 by default). 121 "Increment PLACE by X (1 by default).
@@ -185,8 +186,8 @@ an element already on the list.
185 186
186;;; Control structures. 187;;; Control structures.
187 188
188;;; These macros are so simple and so often-used that it's better to have 189;; These macros are so simple and so often-used that it's better to have
189;;; them all the time than to load them from cl-macs.el. 190;; them all the time than to load them from cl-macs.el.
190 191
191(defun cl-map-extents (&rest cl-args) 192(defun cl-map-extents (&rest cl-args)
192 (apply 'cl-map-overlays cl-args)) 193 (apply 'cl-map-overlays cl-args))
@@ -198,9 +199,10 @@ an element already on the list.
198(defalias 'cl-block-throw 'throw) 199(defalias 'cl-block-throw 'throw)
199 200
200 201
201;;; Multiple values. True multiple values are not supported, or even 202;;; Multiple values.
202;;; simulated. Instead, multiple-value-bind and friends simply expect 203;; True multiple values are not supported, or even
203;;; the target form to return the values as a list. 204;; simulated. Instead, multiple-value-bind and friends simply expect
205;; the target form to return the values as a list.
204 206
205(defsubst values (&rest values) 207(defsubst values (&rest values)
206 "Return multiple values, Common Lisp style. 208 "Return multiple values, Common Lisp style.
@@ -321,7 +323,7 @@ always returns nil."
321 323
322(defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time))) 324(defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time)))
323 325
324;;; The following are actually set by cl-float-limits. 326;; The following are actually set by cl-float-limits.
325(defconst most-positive-float nil) 327(defconst most-positive-float nil)
326(defconst most-negative-float nil) 328(defconst most-negative-float nil)
327(defconst least-positive-float nil) 329(defconst least-positive-float nil)
@@ -585,14 +587,7 @@ If ALIST is non-nil, the new pairs are prepended to it."
585 587
586;;; Miscellaneous. 588;;; Miscellaneous.
587 589
588;;; Autoload the other portions of the package. 590;; Define data for indentation and edebug.
589;; We want to replace the basic versions of dolist, dotimes, declare below.
590(fmakunbound 'dolist)
591(fmakunbound 'dotimes)
592(fmakunbound 'declare)
593(load "cl-loaddefs")
594
595;;; Define data for indentation and edebug.
596(dolist (entry 591(dolist (entry
597 '(((defun* defmacro*) 2) 592 '(((defun* defmacro*) 2)
598 ((function*) nil 593 ((function*) nil
@@ -628,14 +623,19 @@ If ALIST is non-nil, the new pairs are prepended to it."
628 (or (get func 'edebug-form-spec) 623 (or (get func 'edebug-form-spec)
629 (put func 'edebug-form-spec (nth 2 entry))))) 624 (put func 'edebug-form-spec (nth 2 entry)))))
630 625
626;; Autoload the other portions of the package.
627;; We want to replace the basic versions of dolist, dotimes, declare below.
628(fmakunbound 'dolist)
629(fmakunbound 'dotimes)
630(fmakunbound 'declare)
631(load "cl-loaddefs")
631 632
632;;; This goes here so that cl-macs can find it if it loads right now. 633;; This goes here so that cl-macs can find it if it loads right now.
633(provide 'cl-19) ; usage: (require 'cl-19 "cl") 634(provide 'cl-19) ; usage: (require 'cl-19 "cl")
634 635
635 636;; Things to do after byte-compiler is loaded.
636;;; Things to do after byte-compiler is loaded. 637;; As a side effect, we cause cl-macs to be loaded when compiling, so
637;;; As a side effect, we cause cl-macs to be loaded when compiling, so 638;; that the compiler-macros defined there will be present.
638;;; that the compiler-macros defined there will be present.
639 639
640(defvar cl-hacked-flag nil) 640(defvar cl-hacked-flag nil)
641(defun cl-hack-byte-compiler () 641(defun cl-hack-byte-compiler ()
@@ -644,15 +644,15 @@ If ALIST is non-nil, the new pairs are prepended to it."
644 (setq cl-hacked-flag t) ; Do it first, to prevent recursion. 644 (setq cl-hacked-flag t) ; Do it first, to prevent recursion.
645 (cl-compile-time-init)))) ; In cl-macs.el. 645 (cl-compile-time-init)))) ; In cl-macs.el.
646 646
647;;; Try it now in case the compiler has already been loaded. 647;; Try it now in case the compiler has already been loaded.
648(cl-hack-byte-compiler) 648(cl-hack-byte-compiler)
649 649
650;;; Also make a hook in case compiler is loaded after this file. 650;; Also make a hook in case compiler is loaded after this file.
651(add-hook 'bytecomp-load-hook 'cl-hack-byte-compiler) 651(add-hook 'bytecomp-load-hook 'cl-hack-byte-compiler)
652 652
653 653
654;;; The following ensures that packages which expect the old-style cl.el 654;; The following ensures that packages which expect the old-style cl.el
655;;; will be happy with this one. 655;; will be happy with this one.
656 656
657(provide 'cl) 657(provide 'cl)
658 658