X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/b6964cb031b5aa25c34b06ba77540ab06fab2005..dfc2ef11a84d33eab916ff87b8537f8e28c05c92:/lisp/emacs-lisp/macroexp.el diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 68bf4f62c3..05ffa8d52c 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -343,7 +343,7 @@ definitions to shadow the loaded ones for use in file byte-compilation." (defmacro macroexp-let2 (test var exp &rest exps) "Bind VAR to a copyable expression that returns the value of EXP. -This is like `(let ((v ,EXP)) ,EXPS) except that `v' is a new generated +This is like \\=`(let ((v ,EXP)) ,EXPS) except that `v' is a new generated symbol which EXPS can find in VAR. TEST should be the name of a predicate on EXP checking whether the `let' can be skipped; if nil, as is usual, `macroexp-const-p' is used." @@ -465,6 +465,8 @@ itself or not." (defvar macroexp--pending-eager-loads nil "Stack of files currently undergoing eager macro-expansion.") +(defvar macroexp--debug-eager nil) + (defun internal-macroexpand-for-load (form full-p) ;; Called from the eager-macroexpansion in readevalloop. (cond @@ -480,8 +482,10 @@ itself or not." (tail (member elem (cdr (member elem bt))))) (if tail (setcdr tail (list '…))) (if (eq (car-safe (car bt)) 'macroexpand-all) (setq bt (cdr bt))) - (message "Warning: Eager macro-expansion skipped due to cycle:\n %s" - (mapconcat #'prin1-to-string (nreverse bt) " => ")) + (if macroexp--debug-eager + (debug 'eager-macroexp-cycle) + (message "Warning: Eager macro-expansion skipped due to cycle:\n %s" + (mapconcat #'prin1-to-string (nreverse bt) " => "))) (push 'skip macroexp--pending-eager-loads) form)) (t