master 2f6e60c1772: lisp/loadup.el: Move setting 'debugger' to a later phase
Stefan Monnier via Mailing list for Emacs changes <[email protected]>
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: master commit 2f6e60c17721689047680ce8c91e69c9f6c0b15c Author: Stefan Monnier <[email protected]> Commit: Stefan Monnier <[email protected]> lisp/loadup.el: Move setting 'debugger' to a later phase --- lisp/loadup.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/loadup.el b/lisp/loadup.el index d1febf831f7..197af782e43 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -118,7 +118,6 @@ ;; We don't want to have any undo records in the dumped Emacs. (set-buffer "*scratch*") (setq buffer-undo-list t) -(setq debugger 'debug) (load "emacs-lisp/debug-early") (load "emacs-lisp/byte-run") @@ -559,6 +558,15 @@ directory got moved. This is set to be a pair in the form of: ;; file-local variables. (defvar comp--no-native-compile (make-hash-table :test #'equal))) +;; `debugger' is initialized to `debug-early' in `eval.c' so as to help +;; debug bootstrap problems (where loading the real `debug.el' could itself +;; bump into bootstrap problems), but now that we have brought things +;; up, we can switch to the real deal. +;; FIXME: Maybe a simpler option would be to use a single function +;; that dispatches to `debug-early' or to the full debugger +;; depending on context, so we don't need to mutate `debugger' and we +;; additionally avoid bootstrap issues that might occur after the dump. +(setq debugger #'debug) ;; Avoid error if user loads some more libraries now. (setq purify-flag nil)