1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

Add native compiler-macro support.

* lisp/emacs-lisp/macroexp.el (macroexpand-all-1):
Support compiler-macros directly.  Properly follow aliases and apply
the compiler macros more thoroughly.
* lisp/emacs-lisp/cl.el: Don't copy compiler-macro properties any more since
macroexpand now properly follows aliases.
* lisp/emacs-lisp/cl-macs.el (toplevel, cl-define-compiler-macro)
(cl-compiler-macroexpand): Use new prop.
* lisp/emacs-lisp/byte-opt.el (featurep): Optimize earlier.
* lisp/emacs-lisp/cl-lib.el (custom-print-functions): Add compatibility alias.
This commit is contained in:
Stefan Monnier 2012-06-05 11:41:12 -04:00
parent 51a5f9d816
commit 57a7d50707
7 changed files with 80 additions and 58 deletions

View file

@ -321,13 +321,11 @@
(intern (format "cl-%s" fun)))))
(defalias fun new)
;; If `cl-foo' is declare inline, then make `foo' inline as well, and
;; similarly, if `cl-foo' has a compiler-macro, make it available for `foo'
;; as well. Same for edebug specifications, indent rules and
;; similarly. Same for edebug specifications, indent rules and
;; doc-string position.
;; FIXME: For most of them, we should instead follow aliases
;; where applicable.
(dolist (prop '(byte-optimizer byte-compile cl-compiler-macro
doc-string-elt edebug-form-spec
(dolist (prop '(byte-optimizer doc-string-elt edebug-form-spec
lisp-indent-function))
(if (get new prop)
(put fun prop (get new prop))))))