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

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

[nongnu] elpa/spacemacs-theme 1f56fb5b82 123/336: Allow customization of


From: ELPA Syncer
Subject: [nongnu] elpa/spacemacs-theme 1f56fb5b82 123/336: Allow customization of local vars
Date: Fri, 14 Jan 2022 10:59:22 -0500 (EST)

branch: elpa/spacemacs-theme
commit 1f56fb5b8250a3d4a248eeb71e546ec61a5fb132
Author: nashamri <designernasser@gmail.com>
Commit: nashamri <designernasser@gmail.com>

    Allow customization of local vars
---
 spacemacs-common.el | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/spacemacs-common.el b/spacemacs-common.el
index 87ec26012a..8adc220d5e 100644
--- a/spacemacs-common.el
+++ b/spacemacs-common.el
@@ -34,6 +34,9 @@
 
 ;;; Code:
 
+(defmacro dyn-let (varlist fn body)
+  (list 'let (append varlist (funcall fn)) body))
+
 (defgroup spacemacs-theme nil
   "Spacemacs-theme options."
   :group 'faces)
@@ -53,8 +56,17 @@
   :type 'boolean
   :group 'spacemacs-theme)
 
+(defcustom spacemacs-theme-custom-colors nil
+  "Specify a list of custom colors"
+  :type 'alist
+  :group 'spacemacs-theme)
+
+(defun custom-colors-override ()
+  (mapcar (lambda (x) (list (car x) (cdr x)))
+          spacemacs-theme-custom-colors))
+
 (defun create-spacemacs-theme (variant theme-name)
-  (let ((class '((class color) (min-colors 89))) ;;                       ~~ 
Dark ~~                                   ~~ Light ~~
+  (dyn-let ((class '((class color) (min-colors 89))) ;;                   ~~ 
Dark ~~                                   ~~ Light ~~
         ;;                                                               GUI   
    TER                                GUI       TER
         ;; generic
         (active1       (if (eq variant 'dark) (if (display-graphic-p) 
"#222226" "#121212") (if (display-graphic-p) "#e7e5eb" "#d7dfff")))
@@ -107,6 +119,8 @@
         (yellow-bg     (if (eq variant 'dark) (if (display-graphic-p) 
"#32322c" "#262626") (if (display-graphic-p) "#f6f1e1" "#ffffff")))
         )
 
+        custom-colors-override
+
     (custom-theme-set-faces
      theme-name
 



reply via email to

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