[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ef-themes cea48a3b6b 2/6: Fix ef-themes-headings handli
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ef-themes cea48a3b6b 2/6: Fix ef-themes-headings handling |
Date: |
Sun, 25 Feb 2024 00:57:55 -0500 (EST) |
branch: externals/ef-themes
commit cea48a3b6b97b23075c4ec58618c8d325f8c4064
Author: Gautier Ponsinet <gautier@gautierponsinet.xyz>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Fix ef-themes-headings handling
Port codes from the modus themes.
---
ef-themes.el | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/ef-themes.el b/ef-themes.el
index fe0775440d..0d7fa8d3e1 100644
--- a/ef-themes.el
+++ b/ef-themes.el
@@ -344,13 +344,14 @@ further details)."
(when ef-themes-variable-pitch-ui
(list :inherit 'variable-pitch)))
-(defun ef-themes--alist-or-seq (properties alist-key seq-pred seq-default)
- "Return value from alist or sequence.
+(defun ef-themes--property-lookup (properties alist-key list-pred default)
+ "Return value from property alist or list.
Check PROPERTIES for an alist value that corresponds to
ALIST-KEY. If no alist is present, search the PROPERTIES
-sequence given SEQ-PRED, using SEQ-DEFAULT as a fallback."
+list given LIST-PRED, using DEFAULT as a fallback."
(if-let* ((val (or (alist-get alist-key properties)
- (seq-find seq-pred properties seq-default)))
+ (seq-filter (lambda (x) (funcall list-pred x)) properties)
+ default))
((listp val)))
(car val)
val))
@@ -368,15 +369,18 @@ sequence given SEQ-PRED, using SEQ-DEFAULT as a fallback."
(style (or key (alist-get t ef-themes-headings)))
(style-listp (listp style))
(properties style)
- (var (when (memq 'variable-pitch properties) 'variable-pitch))
+ (var (when (and style-listp (memq 'variable-pitch properties))
'variable-pitch))
(weight (when style-listp (ef-themes--weight style))))
(list :inherit
(cond
+ ((not style-listp) 'bold)
(weight var)
(var (append (list 'bold) (list var)))
- ('bold))
+ (t 'bold))
:height
- (ef-themes--alist-or-seq properties 'height #'floatp 'unspecified)
+ (if style-listp
+ (ef-themes--property-lookup properties 'height #'floatp
'unspecified)
+ 'unspecified)
:weight
(or weight 'unspecified))))
- [elpa] externals/ef-themes updated (19fd49469c -> 043c2f75d7), ELPA Syncer, 2024/02/25
- [elpa] externals/ef-themes be119ab05b 4/6: Merge pull request #38 from avkoval/main, ELPA Syncer, 2024/02/25
- [elpa] externals/ef-themes 043c2f75d7 6/6: Note that highlight-indentation is part of the current development version, ELPA Syncer, 2024/02/25
- [elpa] externals/ef-themes cea48a3b6b 2/6: Fix ef-themes-headings handling,
ELPA Syncer <=
- [elpa] externals/ef-themes 375cc1949f 5/6: Acknowledge Oleksii (Alex) Koval for commit be119ab, ELPA Syncer, 2024/02/25
- [elpa] externals/ef-themes 61b25811f6 1/6: Add support for `highlight-identation` mode, ELPA Syncer, 2024/02/25
- [elpa] externals/ef-themes 568e60f7c3 3/6: Acknowledge Gautier Ponsinet for commit cea48a3, ELPA Syncer, 2024/02/25