From 8da669adf00d4f7f62c58ca834cabe4574f2597a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 10 Jul 2021 19:41:13 -0400 Subject: [PATCH] Fix #5253: error if message is called with nil arg --- core/autoload/output.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/autoload/output.el b/core/autoload/output.el index 7f298c052..8c45c49ee 100644 --- a/core/autoload/output.el +++ b/core/autoload/output.el @@ -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) - (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))))) + (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)))))) message) (unwind-protect ,(macroexp-progn body)