Don't set :foreground/background to nil to avoid font warnings in emacs29 (#15877)

Fixes https://github.com/syl20bnr/spacemacs/issues/15862
This commit is contained in:
Tim Ruffing 2023-01-13 07:28:55 +01:00 committed by GitHub
parent 50e5a704b5
commit 9e3fc598ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 19 deletions

View file

@ -342,7 +342,7 @@ Returns the output of git status --porcelain."
(symbol-name state))
:group 'spacemacs))
(set-face-attribute fname nil
:foreground foreground
:foreground (or foreground 'unspecified)
:box (face-attribute 'mode-line :box))))
(defun spacemacs//compute-version-score (version)

View file

@ -67,19 +67,20 @@ For evil states that also need an entry to `spacemacs-evil-cursors' use
;; for example treemacs: it needs no cursor since it solely uses hl-line-mode
;; and having an evil cursor defined anyway leads to the cursor sometimes
;; visibly flashing in treemacs buffers
(eval `(defface ,(intern (format "spacemacs-%s-face" state))
`((t (:background ,color
:foreground ,(face-background 'mode-line)
:inherit 'mode-line)))
(eval `(defface ,(spacemacs/state-color-face (intern state))
`((t (:background ,color :inherit 'mode-line)))
(format "%s state face." state)
:group 'spacemacs)))
:group 'spacemacs))
;; 'unspecified may not be used in defface, so set it via set-face-attribute.
(set-face-attribute (spacemacs/state-color-face (intern state)) nil
:foreground (face-attribute 'mode-line :background)))
(defun spacemacs/set-state-faces ()
(cl-loop for (state color cursor) in spacemacs-evil-cursors
do
(set-face-attribute (intern (format "spacemacs-%s-face" state))
nil
:foreground (face-background 'mode-line))))
(let ((ml-bg (face-attribute 'mode-line :background)))
(cl-loop for (state color cursor) in spacemacs-evil-cursors
do
(set-face-attribute (spacemacs/state-color-face (intern state)) nil
:foreground ml-bg))))
(defun evil-insert-state-cursor-hide ()
(setq evil-insert-state-cursor '((hbar . 0))))

View file

@ -43,8 +43,8 @@
"Set the face of diretories for `.' and `..'"
(set-face-attribute 'helm-ff-dotted-directory
nil
:foreground nil
:background nil
:foreground 'unspecified
:background 'unspecified
:inherit 'helm-ff-directory))
(defun spacemacs//helm-find-files-enable-helm--in-fuzzy ()

View file

@ -527,13 +527,13 @@
:config
(progn
(set-face-attribute 'whitespace-space nil
:background nil
:background 'unspecified
:foreground (face-attribute 'font-lock-warning-face
:foreground))
(set-face-attribute 'whitespace-tab nil
:background nil)
:background 'unspecified)
(set-face-attribute 'whitespace-indentation nil
:background nil)
:background 'unspecified)
(spacemacs|diminish whitespace-mode "" " w")
(spacemacs|diminish global-whitespace-mode "" " w"))))

View file

@ -115,8 +115,8 @@ If `global' is non-nil activate the respective global mode."
(defun spacemacs//adaptive-smartparent-pair-overlay-face ()
(set-face-attribute 'sp-pair-overlay-face nil
:inherit 'lazy-highlight
:background nil
:foreground nil))
:background 'unspecified
:foreground 'unspecified))
(defun spacemacs//put-clean-aindent-last ()
"Put `clean-aindent--check-last-point` to end of `post-command-hook`.

View file

@ -49,7 +49,7 @@ It should be a list of the following form:
;; Font locking
(font-lock-comment-face :slant italic)
(web-mode-html-attr-name-face :inherit font-lock-variable-name-face
:foreground nil)
:foreground 'unspecified)
;; Modeline
(powerline-active1 :box (:color "#999999"
:line-width 1