diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2023-12-21 13:33:27 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2023-12-22 13:10:14 +0100 |
commit | 9db1fe638ecfdd2d8dd32e3ee47f97c5ed3312c1 (patch) | |
tree | 1f80d5f2bbee0f8102badcb9d469c24e695e9649 /lisp/emacs-lisp/macroexp.el | |
parent | f34f474e386b662114e6ee4ebd8c37f4cb66db71 (diff) | |
download | emacs-9db1fe638ecfdd2d8dd32e3ee47f97c5ed3312c1.tar.gz emacs-9db1fe638ecfdd2d8dd32e3ee47f97c5ed3312c1.tar.bz2 emacs-9db1fe638ecfdd2d8dd32e3ee47f97c5ed3312c1.zip |
Encapsulate byte-compile-form-stack maintenance
* lisp/emacs-lisp/bytecomp.el (byte-compile-toplevel-file-form)
(byte-compile-form):
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
Use `macroexp--with-extended-form-stack` instead of explicit
push and pop.
Diffstat (limited to 'lisp/emacs-lisp/macroexp.el')
-rw-r--r-- | lisp/emacs-lisp/macroexp.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 2a646be9725..78601c0648e 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -334,8 +334,7 @@ Only valid during macro-expansion." "Expand all macros in FORM. This is an internal version of `macroexpand-all'. Assumes the caller has bound `macroexpand-all-environment'." - (push form byte-compile-form-stack) - (prog1 + (macroexp--with-extended-form-stack form (if (eq (car-safe form) 'backquote-list*) ;; Special-case `backquote-list*', as it is normally a macro that ;; generates exceedingly deep expansions from relatively shallow input @@ -520,8 +519,7 @@ Assumes the caller has bound `macroexpand-all-environment'." newform (macroexp--expand-all form))) (macroexp--expand-all newform)))))) - (_ form)))) - (pop byte-compile-form-stack))) + (_ form)))))) ;;;###autoload (defun macroexpand-all (form &optional environment) |