diff --git a/core/core-spacemacs-buffer.el b/core/core-spacemacs-buffer.el index 5d11296ba..5e9d57cab 100644 --- a/core/core-spacemacs-buffer.el +++ b/core/core-spacemacs-buffer.el @@ -414,11 +414,11 @@ The message is displayed only if `init-file-debug' is non nil." "List of warnings during startup.") (defun spacemacs-buffer/warning (msg &rest args) - "Display MSG as a warning message but in buffer `*Messages*'. -The message is always displayed. " + "Display MSG as a warning message but in buffer `*Messages*'." (let ((msg (apply 'format msg args))) (message "(Spacemacs) Warning: %s" msg) - (add-to-list 'spacemacs-buffer--warnings msg 'append))) + (when message-log-max + (add-to-list 'spacemacs-buffer--warnings msg 'append)))) (defun spacemacs-buffer/insert-page-break () "Insert a page break line in spacemacs buffer."