branch: elpa/spacemacs-theme
commit 1f56fb5b8250a3d4a248eeb71e546ec61a5fb132
Author: nashamri <[email protected]>
Commit: nashamri <[email protected]>
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