refactor(lib): replace doom-debugger with advice

Writing a debugger for Elisp is too much hassle. `debug` itself isn't
very customizable without a *lot* of boilerplate, so instead of writing
my own, it's more effective to advise debug instead. Certainly, I don't
do anything with it yet, but I will soon.
This commit is contained in:
Henrik Lissner 2022-09-10 17:54:32 +02:00
parent b66ccaeca0
commit d290152a8e
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
3 changed files with 27 additions and 30 deletions

View file

@ -125,14 +125,14 @@ Accepts `ansi' and `text-properties'. `nil' means don't render styles at all.")
(defvar doom-print-logging-level 'debug
"The default logging level used by `doom-log'/`doom-print'.")
(defvar doom-print-message-level 'info
(defvar doom-print-message-level (if noninteractive 'debug 'info)
"The default logging level used by `message'.")
(defvar doom-print--levels
'(debug ; the system is thinking out loud
info ; a FYI; to keep you posted
warning ; a dismissable issue that may have reprecussions later
error)) ; functionality has been disabled by misbehavior
error)) ; functionality has been disabled/broken by misbehavior
(dotimes (i (length doom-print--levels))
(put (nth i doom-print--levels) 'level i))