forked from sellout/emacs-color-theme-solarized
-
Notifications
You must be signed in to change notification settings - Fork 0
/
color-theme-solarized.el
51 lines (41 loc) · 1.44 KB
/
color-theme-solarized.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
;;; Author: Ethan Schoonover, Solarized; Greg Pfeil, Emacs adaptation
;;; URL: http://ethanschoonover.com/solarized
;;; This file is not (YET) part of GNU Emacs.
;;; # Usage
;;; 1. Install the color-theme package
;;; (http://www.emacswiki.org/cgi-bin/wiki/ColorTheme)
;;; 2. Load this file
;;; 3. M-x color-theme-solarized-[dark|light]
(require 'solarized-definitions)
(eval-when-compile
(require 'color-theme))
;;;###autoload
(defun color-theme-solarized (mode)
"Color theme by Ethan Schoonover, created 2011-03-24.
Ported to Emacs by Greg Pfeil, http://ethanschoonover.com/solarized."
(interactive "Slight or dark? ")
(color-theme-install
(let* ((definitions (solarized-color-definitions mode))
(faces (first definitions))
(variables (second definitions)))
(solarized-color-definitions mode)
`(,(intern (concat "color-theme-solarized-" (symbol-name mode)))
,variables
,@faces))))
;;;###autoload
(defun color-theme-solarized-dark ()
(interactive)
(color-theme-solarized 'dark))
;;;###autoload
(defun color-theme-solarized-light ()
(interactive)
(color-theme-solarized 'light))
(add-to-list 'color-themes
`(color-theme-solarized-light
"Solarized Light"
,solarized-description))
(add-to-list 'color-themes
`(color-theme-solarized-dark
"Solarized Dark"
,solarized-description))
(provide 'color-theme-solarized)