Suppress compiler warnings.

This commit is contained in:
Vincent Zhang 2020-02-19 13:16:29 +08:00
parent af24cb1106
commit 25af2880de
3 changed files with 6 additions and 2 deletions

View file

@ -351,6 +351,7 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
default.
For example:
```emacs-lisp
;; Define your custom doom-modeline
(doom-modeline-def-modeline 'my-simple-line

View file

@ -640,6 +640,7 @@ It requires `circe' or `erc' package."
(add-hook 'window-setup-hook #'doom-modeline-refresh-font-width-cache)
(add-hook 'after-make-frame-functions #'doom-modeline-refresh-font-width-cache)
(declare-function doom-modeline-spc 'doom-modeline-core) ; suppress warnings
(defun doom-modeline-def-modeline (name lhs &optional rhs)
"Defines a modeline format and byte-compiles it.
NAME is a symbol to identify it (used by `doom-modeline' for retrieval).

View file

@ -1924,8 +1924,10 @@ mouse-3: Fetch notifications"
(defun doom-modeline--normal-visual (&rest _)
"Restore the face of mode-line."
(face-remap-remove-relative doom-modeline--debug-cookie)
(force-mode-line-update))
(when doom-modeline--debug-cookie
(require 'face-remap)
(face-remap-remove-relative doom-modeline--debug-cookie)
(force-mode-line-update)))
(add-hook 'dap-session-created-hook #'doom-modeline--debug-visual)
(add-hook 'dap-terminated-hook #'doom-modeline--normal-visual)