New doom-log macro for debug-time logging
doom-log won't interfere with the minibuffer if it's in use, and will report the originating module. Addresses #1215
This commit is contained in:
parent
9266239a2f
commit
f6cc2644b0
7 changed files with 32 additions and 22 deletions
|
@ -34,16 +34,14 @@
|
|||
(insert input)
|
||||
(condition-case e
|
||||
(progn
|
||||
(when doom-debug-mode
|
||||
(message "formatter (commandp) %s" #',formatter))
|
||||
(doom-log "formatter (commandp) %s" #',formatter)
|
||||
(call-interactively #',formatter)
|
||||
(list nil ""))
|
||||
(error (list t (error-message-string e))))))))
|
||||
|
||||
(defun +format--make-function (formatter &rest _)
|
||||
`(progn
|
||||
(when doom-debug-mode
|
||||
(message "formatter (functionp) %s" #',formatter))
|
||||
(doom-log "formatter (functionp) %s" #',formatter)
|
||||
(format-all-buffer-thunk #',formatter)))
|
||||
|
||||
(defun +format--make-shell-command (command ok-statuses error-regexp)
|
||||
|
@ -66,8 +64,7 @@
|
|||
((stringp this)
|
||||
(push this subargs))))
|
||||
(setq args (append subargs args)))))))
|
||||
(when doom-debug-mode
|
||||
(message "formatter (arglist) %s" args))
|
||||
(doom-log "formatter (arglist) %s" args)
|
||||
(if ,(and (or ok-statuses error-regexp) t)
|
||||
(apply #'format-all-buffer-hard
|
||||
',ok-statuses ,error-regexp
|
||||
|
|
|
@ -163,8 +163,7 @@ variable for an explanation of the defaults (in comments). See
|
|||
|
||||
(defun +evil-collection-init (module)
|
||||
(unless (memq (or (car-safe module) module) +evil-collection-disabled-list)
|
||||
(when doom-debug-mode
|
||||
(message "Loaded evil-collection-%s" (or (car-safe module) module)))
|
||||
(doom-log "Initialized evil-collection-%s" (or (car-safe module) module))
|
||||
(with-demoted-errors "evil-collection error: %s"
|
||||
(evil-collection-init (list module)))))
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ Otherwise, these properties are available to be set:
|
|||
(xref-backend-identifier-at-point (xref-find-backend)))))
|
||||
|
||||
(defun +lookup--run-hooks (hook identifier origin &optional other-window)
|
||||
(doom-log "Looking up '%s' with '%s'" identifier hook)
|
||||
(condition-case-unless-debug e
|
||||
(if (get hook '+lookup-async)
|
||||
(progn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue