Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
53aacf21
Commit
53aacf21
authored
Jun 05, 2012
by
Stefan Monnier
Browse files
* lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Tolerate errors during
compiler-macro expansion.
parent
57a7d507
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/emacs-lisp/cl-loaddefs.el
lisp/emacs-lisp/cl-loaddefs.el
+1
-1
lisp/emacs-lisp/macroexp.el
lisp/emacs-lisp/macroexp.el
+11
-4
No files found.
lisp/ChangeLog
View file @
53aacf21
2012-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/macroexp.el (macroexpand-all-1): Tolerate errors during
compiler-macro expansion.
Add native compiler-macro support.
* emacs-lisp/macroexp.el (macroexpand-all-1):
Support compiler-macros directly. Properly follow aliases and apply
...
...
lisp/emacs-lisp/cl-loaddefs.el
View file @
53aacf21
...
...
@@ -289,7 +289,7 @@ This also does some trivial optimizations to make the form prettier.
;;;;;; cl-return cl-block cl-etypecase cl-typecase cl-ecase cl-case
;;;;;; cl-load-time-value cl-eval-when cl-destructuring-bind cl-function
;;;;;; cl-defmacro cl-defun cl-gentemp cl-gensym) "
cl-macs
" "
cl-macs.el
"
;;;;;; "
35e128b3ab7780c4f9c25da5a0adea7a
")
;;;;;; "
f3973150add70d26cadb8530147dfc99
")
;;; Generated autoloads from cl-macs.el
(autoload 'cl-gensym "
cl-macs
" "
\
...
...
lisp/emacs-lisp/macroexp.el
View file @
53aacf21
...
...
@@ -187,7 +187,8 @@ Assumes the caller has bound `macroexpand-all-environment'."
(
fboundp
func
)
(
or
(
not
(
eq
(
car-safe
(
symbol-function
func
))
'autoload
))
(
load
(
nth
1
(
symbol-function
func
)))))
(
ignore-errors
(
load
(
nth
1
(
symbol-function
func
))))))
;; Follow the sequence of aliases.
(
setq
func
(
symbol-function
func
)))
(
if
(
null
handler
)
...
...
@@ -195,15 +196,21 @@ Assumes the caller has bound `macroexpand-all-environment'."
;; setq/setq-default this works alright because the variable names
;; are symbols).
(
macroexpand-all-forms
form
1
)
(
let
((
newform
(
apply
handler
form
(
cdr
form
))))
(
let
((
newform
(
condition-case
err
(
apply
handler
form
(
cdr
form
))
(
error
(
message
"Compiler-macro error: %S"
err
)
form
))))
(
if
(
eq
form
newform
)
;; The compiler macro did not find anything to do.
(
if
(
equal
form
(
setq
newform
(
macroexpand-all-forms
form
1
)))
form
;; Maybe after processing the args, some new opportunities
;; appeared, so let's try the compiler macro again.
(
if
(
eq
newform
(
setq
form
(
apply
handler
newform
(
cdr
newform
))))
(
setq
form
(
condition-case
err
(
apply
handler
newform
(
cdr
newform
))
(
error
(
message
"Compiler-macro error: %S"
err
)
newform
)))
(
if
(
eq
newform
form
)
newform
(
macroexpand-all-1
newform
)))
(
macroexpand-all-1
newform
))))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment