New function spacemacs/warning
This commit is contained in:
parent
7e23a62cd7
commit
b8e617c886
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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 "
|
||||
|
|
|
@ -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"))
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue