diff options
author | Stefan Monnier <[email protected]> | 2012-06-08 22:26:47 -0400 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2012-06-08 22:26:47 -0400 |
commit | d9857e534be786674818645a1c51410b4ca68cf8 (patch) | |
tree | a9ef3afbf43c114e4d913c3afc01b98ad9b184b8 /lisp/emacs-lisp/cl-extra.el | |
parent | 7cb70fd73eccd2725b8e436bff3295506816f935 (diff) |
Don't autoload functions too eagerly during macroexpansion.
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Only autoload
a function if there's a clear indication that it has a compiler-macro.
* lisp/emacs-lisp/byte-run.el (defun-declarations-alist, defmacro, defun)
(macro-declarations-alist): Add arglist to declaration functions.
(defun-declarations-alist): Add `obsolete' and `compiler-macro'.
* lisp/emacs-lisp/cl-seq.el (cl-member, cl-assoc):
* lisp/emacs-lisp/cl-lib.el (cl-list*, cl-adjoin):
* lisp/emacs-lisp/cl-extra.el (cl-get): Use the new `declare' statement.
Also add autoload to find the compiler macro.
* lisp/emacs-lisp/cl-macs.el (eql) [compiler-macro]: Remove.
(cl--compiler-macro-member, cl--compiler-macro-assoc)
(cl--compiler-macro-adjoin, cl--compiler-macro-list*)
(cl--compiler-macro-get): New functions, replacing calls to
cl-define-compiler-macro.
(cl-typep) [compiler-macro]: Use macroexp-let².
Diffstat (limited to 'lisp/emacs-lisp/cl-extra.el')
-rw-r--r-- | lisp/emacs-lisp/cl-extra.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 6c774e7e8c..5c5802f0e0 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -584,15 +584,17 @@ If START or END is negative, it counts from the end." ;;; Property lists. ;;;###autoload -(defun cl-get (sym tag &optional def) ; See compiler macro in cl-macs.el +(defun cl-get (sym tag &optional def) "Return the value of SYMBOL's PROPNAME property, or DEFAULT if none. \n(fn SYMBOL PROPNAME &optional DEFAULT)" + (declare (compiler-macro cl--compiler-macro-get)) (or (get sym tag) (and def (let ((plist (symbol-plist sym))) (while (and plist (not (eq (car plist) tag))) (setq plist (cdr (cdr plist)))) (if plist (car (cdr plist)) def))))) +(autoload 'cl--compiler-macro-get "cl-macs") ;;;###autoload (defun cl-getf (plist tag &optional def) |