diff --git a/contrib/irc/rcirc/packages.el b/contrib/irc/rcirc/packages.el index f47625e42..ff1571cfd 100644 --- a/contrib/irc/rcirc/packages.el +++ b/contrib/irc/rcirc/packages.el @@ -22,7 +22,7 @@ which require an initialization must be listed explicitly in the list.") (unless arg (if (file-exists-p "~/.authinfo.gpg") (spacemacs//rcirc-authinfo-config) - (message "Warning: Cannot find file ~/.authinfo.gpg"))) + (spacemacs/warning "Cannot find file ~/.authinfo.gpg"))) (rcirc arg)) (defun spacemacs//rcirc-with-znc (arg) diff --git a/contrib/lang/go/extensions.el b/contrib/lang/go/extensions.el index 324c24f28..53df43738 100644 --- a/contrib/lang/go/extensions.el +++ b/contrib/lang/go/extensions.el @@ -36,8 +36,8 @@ (defun go/init-go-oracle() (let ((go-path (getenv "GOPATH"))) (if (not go-path) - (spacemacs-buffer/message (concat "Warning: GOPATH variable not found, " - "go-oracle configuration skipped.")) + (spacemacs-buffer/warning + "GOPATH variable not found, go-oracle configuration skipped.") (when (load-gopath-file go-path "/src/golang.org/x/tools/cmd/oracle/oracle.el") (evil-leader/set-key-for-mode 'go-mode diff --git a/core/core-configuration-layer.el b/core/core-configuration-layer.el index fba726918..bb353aca7 100644 --- a/core/core-configuration-layer.el +++ b/core/core-configuration-layer.el @@ -235,7 +235,7 @@ the following keys: (plist (append (list :dir dir :ext-dir ext-dir) (when (listp layer) (cdr layer))))) (cons name-sym plist)) - (spacemacs-buffer/message "Warning: Cannot find layer %S !" name-sym) + (spacemacs-buffer/warning "Cannot find layer %S !" name-sym) nil))) (defun configuration-layer//set-layers-variables (layers) @@ -246,8 +246,8 @@ the following keys: (let ((var (pop variables))) (if (consp variables) (set-default var (pop variables)) - (spacemacs-buffer/message "Warning: Missing value for variable %s !" - var))))))) + (spacemacs-buffer/warning "Missing value for variable %s !" + var))))))) (defun configuration-layer/package-usedp (pkg) "Return non-nil if PKG symbol corresponds to a used package." diff --git a/core/core-fonts-support.el b/core/core-fonts-support.el index b15b2dd06..9ad196bc0 100644 --- a/core/core-fonts-support.el +++ b/core/core-fonts-support.el @@ -79,7 +79,7 @@ PLIST has the form (\"fontname\" :prop1 val1 :prop2 val2 ...)" (defun spacemacs/set-font (&rest args) "Deprecated function, display a warning message." - (spacemacs-buffer/message (concat "Warning: spacemacs/set-font is deprecated. " + (spacemacs-buffer/warning (concat "spacemacs/set-font is deprecated. " "Use the variable `dotspacemacs-default-font' " "instead (see Font section in " "~/.emacs.d/doc/DOCUMENTATION.md for more " diff --git a/core/core-spacemacs-buffer.el b/core/core-spacemacs-buffer.el index 6e6dcf7e9..88cfb84bb 100644 --- a/core/core-spacemacs-buffer.el +++ b/core/core-spacemacs-buffer.el @@ -57,8 +57,8 @@ Doge special text banner can be reachable via `999', `doge' or `random*'. (if (and (display-graphic-p) (image-type-available-p 'png)) (if (file-exists-p dotspacemacs-startup-banner) dotspacemacs-startup-banner - (spacemacs-buffer/message (format "Warning: could not find banner %s" - dotspacemacs-startup-banner)) + (spacemacs-buffer/warning (format "could not find banner %s" + dotspacemacs-startup-banner)) (spacemacs-buffer//get-banner-path 1)) (spacemacs-buffer//get-banner-path 1))))) @@ -132,10 +132,16 @@ buffer, right justified." (setq mode-line-format format))) (defun spacemacs-buffer/message (msg &rest args) - "Display MSG in message prepended with '(Spacemacs)'." + "Display MSG in message prepended with '(Spacemacs)'. +The message is displayed only if `dotspacemacs-verbose-loading' is non nil." (when dotspacemacs-verbose-loading (message "(Spacemacs) %s" (apply 'format msg args)))) +(defun spacemacs-buffer/warning (msg &rest args) + "Display MSG as a warning message but in buffer `*Messages*'. +The message is always displayed. " + (message "(Spacemacs) Warning: %s" (apply 'format msg args))) + (defun spacemacs-buffer/insert-page-break () "Insert a page break line in spacemacs buffer." (spacemacs-buffer/append "\n \n\n")) diff --git a/core/core-spacemacs.el b/core/core-spacemacs.el index da3cf28cf..c801b42f9 100644 --- a/core/core-spacemacs.el +++ b/core/core-spacemacs.el @@ -102,8 +102,8 @@ initialization." ;; font (if (find-font (font-spec :name (car dotspacemacs-default-font))) (spacemacs/set-default-font dotspacemacs-default-font) - (spacemacs-buffer/message "Warning: Cannot find font \"%s\"!" - (car dotspacemacs-default-font))) + (spacemacs-buffer/warning "Cannot find font \"%s\"!" + (car dotspacemacs-default-font))) ;; banner (spacemacs-buffer/insert-banner-and-buttons) (setq-default evil-want-C-u-scroll t)