Merge pull request #1237 from flatwhatson/fix-toggle-debug

Fix doom/toggle-debug-mode
This commit is contained in:
Henrik Lissner 2019-03-12 11:29:51 -04:00 committed by GitHub
commit b618025e1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -363,7 +363,12 @@ If INIT-FILE is non-nil, profile that instead of USER-INIT-FILE."
(advice-add #'esup :override #'doom/profile-emacs) (advice-add #'esup :override #'doom/profile-emacs)
;;;###autoload ;;;###autoload
(defun doom/toggle-debug-mode () (defun doom/toggle-debug-mode (&optional arg)
"Enable `debug-on-error' and `doom-debug-mode' for verbose logging." "Toggle `debug-on-error' and `doom-debug-mode' for verbose logging."
(interactive) (interactive (list (or current-prefix-arg 'toggle)))
(setq doom-debug-mode doom-debug-on-error)) (let ((value
(cond ((eq arg 'toggle) (not doom-debug-mode))
((> (prefix-numeric-value arg) 0)))))
(setq doom-debug-mode value
debug-on-error value)
(message "Debug mode %s" (if value "on" "off"))))