]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/debug-early.el (debug-early-backtrace): Fix bug#61847
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 1 Mar 2023 17:31:09 +0000 (12:31 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 1 Mar 2023 17:31:09 +0000 (12:31 -0500)
The `noerror` arg of `require` doesn't do what Stefan naively thought
when he wrote this code, so use `condition-case` instead.
Also check for `cl-defmethod` since `cl-prin1` can't be loaded before
that anyway.

lisp/emacs-lisp/debug-early.el

index 395498f2206c848cd31f94c3b7103d75cfe21118..e393daee8793b30f23c34d814487e15616075069 100644 (file)
@@ -46,10 +46,10 @@ of the build process."
             (print-escape-control-characters t)
             (print-escape-nonascii t)
             (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))
+                            (fboundp 'cl-defmethod) ;Used by `cl-print'.
+                            (condition-case nil
+                                (require 'cl-print)
+                              (error nil)))
                        #'cl-prin1
                      #'prin1)))
         (mapbacktrace