diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-11-19 16:30:55 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-11-19 16:30:55 -0500 |
commit | 141462223d6f8063bf01692c2f41ecc58baea506 (patch) | |
tree | 0b26028b48cc96f16ea3da59912c7408de01d66a /lisp/emacs-lisp/byte-run.el | |
parent | 1000d89524f28cc33341ae00c60ecc6994503f23 (diff) | |
download | emacs-141462223d6f8063bf01692c2f41ecc58baea506.tar.gz |
* lisp/emacs-lisp/byte-run.el (defun-declarations-alist):
Allow compiler-macros to be lambda expressions.
* lisp/progmodes/python.el: Use cl-lib. Move var declarations outside of
eval-when-compile.
(python-syntax-context): Add compiler-macro.
(python-font-lock-keywords): Simplify with De Morgan.
Diffstat (limited to 'lisp/emacs-lisp/byte-run.el')
-rw-r--r-- | lisp/emacs-lisp/byte-run.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 462b4a25154..06f404d615c 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -81,8 +81,14 @@ The return value of this function is not used." #'(lambda (f _args new-name when) `(make-obsolete ',f ',new-name ,when))) (list 'compiler-macro - #'(lambda (f _args compiler-function) - `(put ',f 'compiler-macro #',compiler-function))) + #'(lambda (f args compiler-function) + ;; FIXME: Make it possible to just reuse `args'. + `(eval-and-compile + (put ',f 'compiler-macro + ,(if (eq (car-safe compiler-function) 'lambda) + `(lambda ,(append (cadr compiler-function) args) + ,@(cddr compiler-function)) + #',compiler-function))))) (list 'doc-string #'(lambda (f _args pos) (list 'put (list 'quote f) ''doc-string-elt (list 'quote pos)))) |