mu4e: Add mu4e-header-field-face, avoid mu-header-key-face cycle

By default, mu4e-header-key-face inherits from message-header-name; this
leads to warnings when we later remap the latter to the former in
mu4e-compose.el.

We don't want to change the definition of mu4e-header-key-face (it's
used widely in mu4e); so we add a new face mu4e-header-field-face
for *just* mu4e-compose and which does not inherit.

Fixes #2321.
This commit is contained in:
Dirk-Jan C. Binnema 2022-08-20 13:29:04 +03:00
parent 48681b8cfb
commit 18bf2d995d
2 changed files with 8 additions and 2 deletions

View File

@ -316,7 +316,7 @@ Our parent `message-mode' uses font-locking for the compose
buffers; lets remap its faces so it uses the ones for mu4e."
;; normal headers
(face-remap-add-relative 'message-header-name
'((:inherit mu4e-header-key-face)))
'((:inherit mu4e-header-field-face)))
(face-remap-add-relative 'message-header-other
'((:inherit mu4e-header-value-face)))
;; special headers

View File

@ -122,7 +122,13 @@ I.e. a message with the draft flag set."
(defface mu4e-header-key-face
'((t :inherit message-header-name :weight bold))
"Face for a header key (such as \"Foo\" in \"Subject:\ Foo\")."
"Face used to highlight items in various places."
:group 'mu4e-faces)
(defface mu4e-header-field-face
'((t :weight bold))
"Face for a header field name (such as \"Subject:\" in \"Subject:\
Foo\")."
:group 'mu4e-faces)
(defface mu4e-header-value-face