core: register warning message only when messages are not inhibited

This commit is contained in:
syl20bnr 2016-10-20 09:32:03 -04:00
parent ee6c353abd
commit 48c3ecd1f8
1 changed files with 3 additions and 3 deletions

View File

@ -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."