summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/autoload.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-12-01 09:45:15 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2014-12-01 09:45:15 -0500
commitf0e8c1eac226641ea8acab9e0f47ce3541803f0d (patch)
tree88af1f8b3ecf2c3e576cb5db3ff8957fb234d77c /lisp/emacs-lisp/autoload.el
parent578d91ac509a9856cf854bea75b6328cf40d1d03 (diff)
downloademacs-f0e8c1eac226641ea8acab9e0f47ce3541803f0d.tar.gz
New macro `define-inline'.
* lisp/emacs-lisp/inline.el: New file.
Diffstat (limited to 'lisp/emacs-lisp/autoload.el')
-rw-r--r--lisp/emacs-lisp/autoload.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 38956df66de..01f59704a39 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -120,7 +120,8 @@ expression, in which case we want to handle forms differently."
;; Look for an interactive spec.
(interactive (pcase body
((or `((interactive . ,_) . ,_)
- `(,_ (interactive . ,_) . ,_)) t))))
+ `(,_ (interactive . ,_) . ,_))
+ t))))
;; Add the usage form at the end where describe-function-1
;; can recover it.
(when (listp args) (setq doc (help-add-fundoc-usage doc args)))
@@ -140,11 +141,9 @@ expression, in which case we want to handle forms differently."
;; For complex cases, try again on the macro-expansion.
((and (memq car '(easy-mmode-define-global-mode define-global-minor-mode
define-globalized-minor-mode defun defmacro
- ;; FIXME: we'd want `defmacro*' here as well, so as
- ;; to handle its `declare', but when autoload is run
- ;; CL is not loaded so macroexpand doesn't know how
- ;; to expand it!
- easy-mmode-define-minor-mode define-minor-mode))
+ easy-mmode-define-minor-mode define-minor-mode
+ define-inline cl-defun cl-defmacro))
+ (macrop car)
(setq expand (let ((load-file-name file)) (macroexpand form)))
(memq (car expand) '(progn prog1 defalias)))
(make-autoload expand file 'expansion)) ;Recurse on the expansion.