[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/alect-themes 3677326 049/269: Add support for 2 variants o
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/alect-themes 3677326 049/269: Add support for 2 variants of face specification |
Date: |
Thu, 21 Oct 2021 17:58:47 -0400 (EDT) |
branch: elpa/alect-themes
commit 36773264ebfd8ddf6753c95d8db1c0d4b45d7d7f
Author: Alex Kost <alezost@gmail.com>
Commit: Alex Kost <alezost@gmail.com>
Add support for 2 variants of face specification
Elements can be either in (DISPLAY . PLIST) or (DISPLAY PLIST) forms.
See (info "(elisp) Defining Faces") for details.
---
alect-themes.el | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/alect-themes.el b/alect-themes.el
index e5f5a25..5ca8a26 100644
--- a/alect-themes.el
+++ b/alect-themes.el
@@ -1227,6 +1227,8 @@ See `alect-substitute-colors-in-plist' for details."
(defun alect-substitute-colors-in-plist (theme-name plist)
"Substitute color names in property list PLIST with color values.
+PLIST can also be a list containing property list.
+
Color values (strings) are defined by color names (symbols) for a
specified theme THEME-NAME from `alect-colors' variable. Replace
colors for the `:foreground' and `:background' properties. If
@@ -1235,13 +1237,16 @@ property as well.
Return plist with substituted colors. This function is
destructive: PLIST may not stay the same."
- (setq plist (alect-substitute-color theme-name plist :foreground))
- (setq plist (alect-substitute-color theme-name plist :background))
- (let ((box-plist (plist-get plist :box)))
- (and box-plist
- (setq box-plist (alect-substitute-color theme-name box-plist :color))
- (setq plist (plist-put plist :box box-plist))))
- plist)
+ (if (and (listp (car plist))
+ (null (cdr plist)))
+ (alect-substitute-colors-in-plist theme-name (car plist))
+ (setq plist (alect-substitute-color theme-name plist :foreground))
+ (setq plist (alect-substitute-color theme-name plist :background))
+ (let ((box-plist (plist-get plist :box)))
+ (and box-plist
+ (setq box-plist (alect-substitute-color theme-name box-plist
:color))
+ (setq plist (plist-put plist :box box-plist))))
+ plist))
(defun alect-substitute-colors-in-faces (theme-name faces)
"Substitute color names in a list FACES with color values.
@@ -1256,9 +1261,9 @@ See `alect-substitute-colors-in-plist' for details."
(mapcar (lambda (face)
(list (car face)
(mapcar (lambda (spec)
- (list (car spec)
+ (cons (car spec)
(alect-substitute-colors-in-plist
- theme-name (cadr spec))))
+ theme-name (cdr spec))))
(cadr face))))
faces))
- [nongnu] elpa/alect-themes 6c459a6 029/269: Update .gitignore, (continued)
- [nongnu] elpa/alect-themes 6c459a6 029/269: Update .gitignore, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes ff095a8 030/269: Update README, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 209804e 037/269: Inherit `org-agenda-structure' from `alect-title', ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes b0ee25c 040/269: Delete unknown w3m faces, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes d9583c9 044/269: Remove redundant part from mode-line face, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 5e6748d 042/269: Improve match face, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 2c0ba50 053/269: Update version (0.3) and package commentary, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 32c3244 056/269: Update version (0.3.1), ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 7b4397a 064/269: Modify `font-lock-warning-face', ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes fa8f779 071/269: Modify `alect-color-level-9' face, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 3677326 049/269: Add support for 2 variants of face specification,
ELPA Syncer <=
- [nongnu] elpa/alect-themes 0a8e941 050/269: Remove redundant parentheses in faces, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes b0d7687 052/269: Improve the docstring of `alect-overriding-faces', ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 6187e8b 058/269: Modify colors for gnus and emms mode-line icons, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 38a5b63 068/269: Add faces for dictem-mode, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes a858dea 061/269: Add description of emacs bug in theming variables, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes ac6c00e 073/269: Add a mention of `utl-load-theme', ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes fa7b2e7 084/269: Modify `font-lock-negation-char-face', ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 3e51c3e 046/269: Add support for configuring faces, ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 38622f2 066/269: Update version (0.3.3), ELPA Syncer, 2021/10/21
- [nongnu] elpa/alect-themes 8468caa 069/269: Update version (0.3.4), ELPA Syncer, 2021/10/21