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

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

[nongnu] elpa/dracula-theme 747948e 183/187: Add support for ansi-color-


From: ELPA Syncer
Subject: [nongnu] elpa/dracula-theme 747948e 183/187: Add support for ansi-color-names-vector
Date: Thu, 21 Oct 2021 18:05:19 -0400 (EDT)

branch: elpa/dracula-theme
commit 747948e7cfd9f2373111c3f26e642166c487824a
Author: Étienne Deparis <etienne@depar.is>
Commit: Étienne Deparis <etienne@depar.is>

    Add support for ansi-color-names-vector
    
    Fixes: https://github.com/dracula/emacs/issues/75
---
 dracula-theme.el | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/dracula-theme.el b/dracula-theme.el
index d35f1f1..e49ea6d 100644
--- a/dracula-theme.el
+++ b/dracula-theme.el
@@ -786,8 +786,24 @@ read it before opening a new issue about your will.")
                       (t                       ; should be only tty-like envs
                        ,(funcall expand-with-func 'cadddr spec))))
                    whole-theme))
-           whole-theme)))
+           whole-theme))
 
+  (apply #'custom-theme-set-variables
+         'dracula
+         (let ((get-func
+                (pcase (display-color-cells)
+                  ((pred (<= 16777216)) 'car) ; fully graphical envs
+                  ((pred (<= 256)) 'cadr)     ; terminal withs 256 colors
+                  (_ 'caddr))))               ; should be only tty-like envs
+           `((ansi-color-names-vector
+              [,(funcall get-func (alist-get 'dracula-bg colors))
+               ,(funcall get-func (alist-get 'dracula-red colors))
+               ,(funcall get-func (alist-get 'dracula-green colors))
+               ,(funcall get-func (alist-get 'dracula-yellow colors))
+               ,(funcall get-func (alist-get 'dracula-comment colors))
+               ,(funcall get-func (alist-get 'dracula-purple colors))
+               ,(funcall get-func (alist-get 'dracula-cyan colors))
+               ,(funcall get-func (alist-get 'dracula-fg colors))])))))
 
 
 ;;;###autoload



reply via email to

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