emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ement 570318221b: Fix: (defface ement-room-list-direct)


From: ELPA Syncer
Subject: [elpa] externals/ement 570318221b: Fix: (defface ement-room-list-direct) Weight
Date: Sat, 30 Mar 2024 00:57:54 -0400 (EDT)

branch: externals/ement
commit 570318221b65b4ef37402cf7ac0023a3fffa0cfa
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Fix: (defface ement-room-list-direct) Weight
---
 README.org         |  1 +
 ement-room-list.el | 13 ++++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index 54869dce5d..470ff28e89 100644
--- a/README.org
+++ b/README.org
@@ -349,6 +349,7 @@ Ement.el doesn't support encrypted rooms natively, but it 
can be used transparen
 + Toggling images to fill the window body no longer triggers unintended 
scrolling.  (Thanks to [[https://github.com/phil-s][Phil Sainty]].)
 + Recognition of mentions after a newline.  
([[https://github.com/alphapapa/ement.el/issues/267][#267]].  Thanks to 
[[https://github.com/phil-s][Phil Sainty]].)
 + Newlines in ~ement-room-message-format-spec~ are considered when calculating 
the wrap-prefix.  (Thanks to [[https://github.com/phil-s][Phil Sainty]].)
++ Weight of face ~ement-room-list-direct~ (now correctly bold in room list 
heading).
 
 ** 0.14
 
diff --git a/ement-room-list.el b/ement-room-list.el
index a5d4069065..603803660c 100644
--- a/ement-room-list.el
+++ b/ement-room-list.el
@@ -141,9 +141,16 @@ Set automatically when `ement-room-list-mode' is 
activated.")
 ;;;;; Faces
 
 (defface ement-room-list-direct
-  ;; In case `font-lock-constant-face' is bold, we set the weight to normal, 
so it can be
-  ;; made bold for unread rooms only.
-  '((t (:weight normal :inherit (font-lock-constant-face 
ement-room-list-name))))
+  ;; We want to use `font-lock-constant-face' as the base face (because it 
seems to look
+  ;; nice with most themes), but that face sometimes is defined as bold, which 
interferes
+  ;; with our ability to use boldness to indicate unread rooms.  But if we 
override the
+  ;; weight to be normal, even the "People" heading in the room list will not 
be bold,
+  ;; which group headings should be.  So we make a copy of the face, unset its 
weight, and
+  ;; inherit from that.
+  (progn
+    (copy-face 'font-lock-constant-face 'ement--font-lock-constant-face)
+    (set-face-attribute 'ement--font-lock-constant-face nil :weight 
'unspecified)
+    '((t (:inherit (ement--font-lock-constant-face ement-room-list-name)))))
   "Direct rooms.")
 
 (defface ement-room-list-favourite '((t (:inherit (font-lock-doc-face 
ement-room-list-name))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]