Don't enable explain-pause-mode at startup

When starting Emacs in debug mode, explain-pause-mode is enabled. This
pulls in other packages with it, which can taint results when testing
package load order. Also, explain-pause-mode is for measuring pauses
during interactive use, it isn't very useful for startup benchmarking.

So we only toggle it if doom-debug-mode is toggled interactively.
This commit is contained in:
Henrik Lissner 2020-10-11 16:26:04 -04:00
parent c59ae5d172
commit db07304c71
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -49,8 +49,9 @@ symbol and CDR is the value to set it to when `doom-debug-mode' is activated.")
((if (boundp var)
(set-default var enabled)
(add-to-list 'doom--debug-vars-undefined var)))))
(when (called-interactively-p 'any)
(when (fboundp 'explain-pause-mode)
(explain-pause-mode (if enabled +1 -1)))
(explain-pause-mode (if enabled +1 -1))))
;; Watch for changes in `doom-debug-variables', or when packages load (and
;; potentially define one of `doom-debug-variables'), in case some of them
;; aren't defined when `doom-debug-mode' is first loaded.