diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-11-01 04:21:03 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-11-01 04:21:03 +0000 |
commit | 2a8160e65288a502a6234d08b2f221260b8e12b0 (patch) | |
tree | 9351fb23a66c368273b3184badf4e27ef9b5c8a3 /lisp/emacs-lisp/cl.el | |
parent | 71e2ab547b52dfc13a841a1103bb2156c13a7b35 (diff) | |
download | emacs-2a8160e65288a502a6234d08b2f221260b8e12b0.tar.gz |
(cl-macroexpand): keep documentation from `macroexpand'.
Diffstat (limited to 'lisp/emacs-lisp/cl.el')
-rw-r--r-- | lisp/emacs-lisp/cl.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index fca1ab7d572..3d0a3c49602 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -254,6 +254,13 @@ Keywords supported: :test :test-not :key" (defalias 'macroexpand 'cl-macroexpand))) (defun cl-macroexpand (cl-macro &optional cl-env) + "Return result of expanding macros at top level of FORM. +If FORM is not a macro call, it is returned unchanged. +Otherwise, the macro is expanded and the expansion is considered +in place of FORM. When a non-macro-call results, it is returned. + +The second optional arg ENVIRONMENT species an environment of macro +definitions to shadow the loaded ones for use in file byte-compilation." (let ((cl-macro-environment cl-env)) (while (progn (setq cl-macro (funcall cl-old-macroexpand cl-macro cl-env)) (and (symbolp cl-macro) |