From f653fd9f109fd04b4e14cf55ccf71505b16253dd Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 7 Jun 2026 13:31:45 +0300 Subject: [PATCH] Avoid recursive error in debug-early in batch mode * lisp/emacs-lisp/debug-early.el (cl--generic-compiler): Defvar it. (debug-early-backtrace): Bind it so as to avoid loading byte-compiler; see the value of the variable in cl-generic.el. Do not merge to master. (Bug#80916) --- lisp/emacs-lisp/debug-early.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/emacs-lisp/debug-early.el b/lisp/emacs-lisp/debug-early.el index 02dc275c02f..1e463534492 100644 --- a/lisp/emacs-lisp/debug-early.el +++ b/lisp/emacs-lisp/debug-early.el @@ -38,6 +38,8 @@ (defvar debugger--last-error nil) +(defvar cl--generic-compiler) + (defalias 'debug-early-backtrace #'(lambda (&optional base) "Print a trace of Lisp function calls currently active. @@ -50,6 +52,8 @@ of the build process." (let ((print-escape-newlines t) (print-escape-control-characters t) (print-escape-nonascii t) + (cl--generic-compiler + (lambda (exp) (eval exp t))) (prin1 (if (and (fboundp 'cl-prin1) (fboundp 'cl-defmethod) ;Used by `cl-print'. (condition-case nil