[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dracula-theme aa72f3d 182/187: Remove cl-lib dependency
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dracula-theme aa72f3d 182/187: Remove cl-lib dependency |
Date: |
Thu, 21 Oct 2021 18:05:19 -0400 (EDT) |
branch: elpa/dracula-theme
commit aa72f3d5c4d49cc0fb581d2f4eac528cf0278a11
Author: Étienne Deparis <etienne@depar.is>
Commit: Étienne Deparis <etienne@depar.is>
Remove cl-lib dependency
Honestly, this doesn’t improve readability, however cl powered code was not
really readable itself, thus it’s kind of an improvement.
---
dracula-theme.el | 40 +++++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/dracula-theme.el b/dracula-theme.el
index 3916472..d35f1f1 100644
--- a/dracula-theme.el
+++ b/dracula-theme.el
@@ -14,7 +14,6 @@
;; A dark color theme available for a number of editors.
;;; Code:
-(require 'cl-lib)
(deftheme dracula)
@@ -767,25 +766,28 @@ read it before opening a new issue about your will.")
(apply #'custom-theme-set-faces
'dracula
- (let ((color-names (mapcar #'car colors))
- (graphic-colors (mapcar #'cadr colors))
- (term-colors (mapcar #'caddr colors))
- (tty-colors (mapcar #'cadddr colors))
- (expand-for-kind
- (lambda (kind spec)
- (when (and (eq kind 'term-colors)
+ (let ((expand-with-func
+ (lambda (func spec)
+ (when (and (eq func 'caddr)
dracula-use-24-bit-colors-on-256-colors-terms)
- (setq kind 'graphic-colors))
- (cl-progv color-names (symbol-value kind)
- (eval `(backquote ,spec))))))
- (cl-loop for (face . spec) in faces
- collect `(,face
- ((((min-colors 16777216)) ; fully graphical envs
- ,(funcall expand-for-kind 'graphic-colors
spec))
- (((min-colors 256)) ; terminal withs 256
colors
- ,(funcall expand-for-kind 'term-colors spec))
- (t ; should be only
tty-like envs
- ,(funcall expand-for-kind 'tty-colors
spec))))))))
+ (setq func 'cadr))
+ (let (reduced-color-list)
+ (eval `(let ,(dolist (col colors reduced-color-list)
+ (push `(,(car col) ,(funcall func col))
+ reduced-color-list))
+ (eval `(backquote ,spec)))))))
+ whole-theme)
+ (pcase-dolist (`(,face . ,spec) faces)
+ (push `(,face
+ ((((min-colors 16777216)) ; fully graphical envs
+ ,(funcall expand-with-func 'cadr spec))
+ (((min-colors 256)) ; terminal withs 256 colors
+ ,(funcall expand-with-func 'caddr spec))
+ (t ; should be only tty-like envs
+ ,(funcall expand-with-func 'cadddr spec))))
+ whole-theme))
+ whole-theme)))
+
;;;###autoload
- [nongnu] elpa/dracula-theme 2e8c92b 173/187: Support ivy, (continued)
- [nongnu] elpa/dracula-theme 2e8c92b 173/187: Support ivy, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme c7618c8 184/187: Little change to file metadata, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 747948e 183/187: Add support for ansi-color-names-vector, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 99ef8ef 185/187: Merge branch 'wip', ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme df547c4 151/187: Add more faces in lsp-ui-sideline and lep-ui-doc, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme abcbe86 165/187: Use purple for markdown blockquote, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme aa2cae7 166/187: Add support for gemini-mode and elpher, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme b5e50ed 168/187: Avoid black and black text for TUI applications, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme dfe27a9 171/187: Improve completions (from minibuffer.el) colors, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme fc8d122 176/187: Remove useless , in front of inherited faces, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme aa72f3d 182/187: Remove cl-lib dependency,
ELPA Syncer <=
- [nongnu] elpa/dracula-theme 35538d5 003/187: Emacs: fix package boilerplate, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 9fa39ff 014/187: Added README and LICENSE, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 4b2aeab 015/187: Added Team to README, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme a362edd 026/187: Merge pull request #11 from fszymanski/master, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme c9f8a97 040/187: Bump version to 1.2.8, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 3a1ef88 047/187: Bump version to 1.3.0, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme c2c94d9 048/187: Set background color to black on non-graphical startup, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 1f64982 062/187: Bump version to 1.4.0, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme e0542cc 059/187: Refactor to ease definition display-type specific colors, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 602852d 070/187: Added `highlight-indentation` minor mode support, ELPA Syncer, 2021/10/21