[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108615: * lisp/emacs-lisp/cl-lib.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108615: * lisp/emacs-lisp/cl-lib.el (cl--defsubst-expand): Autoload inliner. |
Date: |
Thu, 14 Jun 2012 23:18:14 -0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108615
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11649
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2012-06-14 23:18:14 -0400
message:
* lisp/emacs-lisp/cl-lib.el (cl--defsubst-expand): Autoload inliner.
* lisp/emacs-lisp/macroexp.el (macroexp--compiler-macro): New function.
(macroexp--expand-all): Use it.
modified:
lisp/ChangeLog
lisp/emacs-lisp/cl-lib.el
lisp/emacs-lisp/macroexp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-06-15 02:05:43 +0000
+++ b/lisp/ChangeLog 2012-06-15 03:18:14 +0000
@@ -1,5 +1,11 @@
2012-06-15 Stefan Monnier <address@hidden>
+ * emacs-lisp/cl-lib.el (cl--defsubst-expand): Autoload inliner
+ (bug#11649).
+
+ * emacs-lisp/macroexp.el (macroexp--compiler-macro): New function.
+ (macroexp--expand-all): Use it.
+
* emacs-lisp/cl-macs.el (cl--transform-function-property): Remove.
(cl-define-setf-expander, cl-deftype, cl-define-compiler-macro):
Use `cl-function' instead.
=== modified file 'lisp/emacs-lisp/cl-lib.el'
--- a/lisp/emacs-lisp/cl-lib.el 2012-06-11 20:35:00 +0000
+++ b/lisp/emacs-lisp/cl-lib.el 2012-06-15 03:18:14 +0000
@@ -641,6 +641,9 @@
;;;###autoload
(progn
+ ;; Make sure functions defined with cl-defsubst can be inlined even in
+ ;; packages which do not require CL.
+ (autoload 'cl--defsubst-expand "cl-macs")
;; Autoload, so autoload.el and font-lock can use it even when CL
;; is not loaded.
(put 'cl-defun 'doc-string-elt 3)
=== modified file 'lisp/emacs-lisp/macroexp.el'
--- a/lisp/emacs-lisp/macroexp.el 2012-06-09 02:26:47 +0000
+++ b/lisp/emacs-lisp/macroexp.el 2012-06-15 03:18:14 +0000
@@ -94,6 +94,12 @@
(macroexp--all-forms clause skip)
clause)))
+(defun macroexp--compiler-macro (handler form)
+ (condition-case err
+ (apply handler form (cdr form))
+ (error (message "Compiler-macro error for %S: %S" (car form) err)
+ form))))
+
(defun macroexp--expand-all (form)
"Expand all macros in FORM.
This is an internal version of `macroexpand-all'.
@@ -198,20 +204,14 @@
(ignore-errors
(load (nth 1 (symbol-function func))
'noerror 'nomsg)))
- (let ((newform (condition-case err
- (apply handler form (cdr form))
- (error (message "Compiler-macro error: %S" err)
- form))))
+ (let ((newform (macroexp--compiler-macro handler form)))
(if (eq form newform)
;; The compiler macro did not find anything to do.
(if (equal form (setq newform (macroexp--all-forms form 1)))
form
;; Maybe after processing the args, some new opportunities
;; appeared, so let's try the compiler macro again.
- (setq form (condition-case err
- (apply handler newform (cdr newform))
- (error (message "Compiler-macro error: %S" err)
- newform)))
+ (setq form (macroexp--compiler-macro handler newform))
(if (eq newform form)
newform
(macroexp--expand-all newform)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108615: * lisp/emacs-lisp/cl-lib.el (cl--defsubst-expand): Autoload inliner.,
Stefan Monnier <=