From 18bf2d995d242ed2e44f2379e357d7012d0e0b16 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sat, 20 Aug 2022 13:29:04 +0300 Subject: [PATCH] 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. --- mu4e/mu4e-compose.el | 2 +- mu4e/mu4e-vars.el | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index eb9647b4..ffb556d2 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -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 diff --git a/mu4e/mu4e-vars.el b/mu4e/mu4e-vars.el index dd0ffde5..beaf1edf 100644 --- a/mu4e/mu4e-vars.el +++ b/mu4e/mu4e-vars.el @@ -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