summaryrefslogtreecommitdiff
path: root/zenburn-theme.el
diff options
context:
space:
mode:
authorTianxiang Xiong <tianxiang.xiong@fundingcircle.com>2018-01-22 17:07:05 -0800
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2018-01-23 10:59:17 +0200
commit4b3e541721f52dbfa307e2cab3cd682e25987fdd (patch)
tree4a74df8504d5138747e833ff0e39fa0424342c05 /zenburn-theme.el
parentce1f08372391fa17a974769930b904a0b893fec2 (diff)
Make `zenburn-override-colors-alist` a customizable variable
Diffstat (limited to 'zenburn-theme.el')
-rw-r--r--zenburn-theme.el30
1 files changed, 19 insertions, 11 deletions
diff --git a/zenburn-theme.el b/zenburn-theme.el
index c31f3f2..b6dbcda 100644
--- a/zenburn-theme.el
+++ b/zenburn-theme.el
@@ -33,6 +33,23 @@
(deftheme zenburn "The Zenburn color theme")
+(defgroup zenburn-theme nil
+ "Zenburn theme."
+ :prefix "zenburn-theme-"
+ :link '(url-link :tag "GitHub" "http://github.com/bbatsov/zenburn-emacs")
+ :tag "Zenburn theme")
+
+;;;###autoload
+(defcustom zenburn-override-colors-alist '()
+ "Place to override default theme colors.
+
+You can override a subset of the theme's default colors by
+defining them in this alist."
+ :group 'zenburn-theme
+ :type '(alist
+ :key-type (string :tag "Name")
+ :value-type (string :tag " Hex")))
+
;;; Color Palette
(defvar zenburn-default-colors-alist
@@ -78,16 +95,6 @@ Each element has the form (NAME . HEX).
`+N' suffixes indicate a color is lighter.
`-N' suffixes indicate a color is darker.")
-(defvar zenburn-override-colors-alist
- '()
- "Place to override default theme colors.
-
-You can override a subset of the theme's default colors by
-defining them in this alist before loading the theme.")
-
-(defvar zenburn-colors-alist
- (append zenburn-default-colors-alist zenburn-override-colors-alist))
-
(defmacro zenburn-with-color-variables (&rest body)
"`let' bind all colors defined in `zenburn-colors-alist' around BODY.
Also bind `class' to ((class color) (min-colors 89))."
@@ -95,7 +102,8 @@ Also bind `class' to ((class color) (min-colors 89))."
`(let ((class '((class color) (min-colors 89)))
,@(mapcar (lambda (cons)
(list (intern (car cons)) (cdr cons)))
- zenburn-colors-alist))
+ (append zenburn-default-colors-alist
+ zenburn-override-colors-alist)))
,@body))
;;; Theme Faces