Fix #5253: error if message is called with nil arg

This commit is contained in:
Henrik Lissner 2021-07-10 19:41:13 -04:00
parent aeb809ed8b
commit 8da669adf0

View file

@ -255,11 +255,12 @@ DEST can be one or more of `standard-output', a buffer, a file"
(insert-char out))
(send-string-to-terminal (char-to-string out)))))
(letf! (defun message (msg &rest args)
(when msg
(print-group!
(with-current-buffer log-buffer
(insert (doom--format (apply #'format msg args)) "\n"))
(when (or doom-debug-p (not inhibit-message))
(doom--print (doom--format (apply #'format msg args)))))
(doom--print (doom--format (apply #'format msg args))))))
message)
(unwind-protect
,(macroexp-progn body)