From: Lars Ingebrigtsen Date: Fri, 24 Jun 2022 08:43:41 +0000 (+0200) Subject: Make debug-early-backtrace more resilient X-Git-Tag: emacs-29.0.90~1447^2~1502 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bd1f20eea199d61a8b1db602392d8e17af624ff2;p=emacs.git Make debug-early-backtrace more resilient * lisp/emacs-lisp/debug-early.el (debug-early-backtrace): Allow outputting backtraces during bootstrap. --- diff --git a/lisp/emacs-lisp/debug-early.el b/lisp/emacs-lisp/debug-early.el index 4f1f4b81557..a301c73017e 100644 --- a/lisp/emacs-lisp/debug-early.el +++ b/lisp/emacs-lisp/debug-early.el @@ -45,7 +45,13 @@ of the build process." (let ((print-escape-newlines t) (print-escape-control-characters t) (print-escape-nonascii t) - (prin1 (if (fboundp 'cl-prin1) #'cl-prin1 #'prin1))) + (prin1 (if (and (fboundp 'cl-prin1) + ;; If we're being called while + ;; bootstrapping, we won't be able to load + ;; cl-print. + (require 'cl-print nil t)) + #'cl-prin1 + #'prin1))) (mapbacktrace #'(lambda (evald func args _flags) (let ((args args))