2011-04-02 09:04:21 +02:00
|
|
|
;;; Author: Ethan Schoonover, Solarized; Greg Pfeil, Emacs adaptation
|
|
|
|
;;; URL: http://ethanschoonover.com/solarized
|
2011-03-26 16:19:07 +01:00
|
|
|
|
2011-04-02 09:04:21 +02:00
|
|
|
;;; 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]
|
2011-03-26 16:19:07 +01:00
|
|
|
|
2012-02-11 00:26:03 +01:00
|
|
|
(require 'solarized-definitions
|
2012-02-11 00:37:55 +01:00
|
|
|
(let* ((reqname (concat (file-name-directory (or load-file-name
|
|
|
|
buffer-file-name))
|
|
|
|
"solarized-definitions.el"))
|
|
|
|
(compreqname (concat reqname "c")))
|
|
|
|
(if (file-exists-p compreqname) compreqname reqname)))
|
2011-04-25 02:00:05 +02:00
|
|
|
|
2011-03-26 15:46:37 +01:00
|
|
|
(eval-when-compile
|
|
|
|
(require 'color-theme))
|
|
|
|
|
2011-04-15 03:35:21 +02:00
|
|
|
;;;###autoload
|
2011-03-26 15:46:37 +01:00
|
|
|
(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? ")
|
2011-04-25 02:00:05 +02:00
|
|
|
(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))))
|
2011-03-26 15:46:37 +01:00
|
|
|
|
2011-04-15 03:35:21 +02:00
|
|
|
;;;###autoload
|
2011-04-02 09:03:09 +02:00
|
|
|
(defun color-theme-solarized-dark ()
|
|
|
|
(interactive)
|
|
|
|
(color-theme-solarized 'dark))
|
|
|
|
|
2011-04-15 03:35:21 +02:00
|
|
|
;;;###autoload
|
2011-04-02 09:03:09 +02:00
|
|
|
(defun color-theme-solarized-light ()
|
|
|
|
(interactive)
|
|
|
|
(color-theme-solarized 'light))
|
|
|
|
|
2011-04-11 18:16:17 +02:00
|
|
|
(add-to-list 'color-themes
|
2011-04-25 02:00:05 +02:00
|
|
|
`(color-theme-solarized-light
|
2011-04-11 18:16:17 +02:00
|
|
|
"Solarized Light"
|
2011-04-25 02:00:05 +02:00
|
|
|
,solarized-description))
|
2011-04-11 18:16:17 +02:00
|
|
|
(add-to-list 'color-themes
|
2011-04-25 02:00:05 +02:00
|
|
|
`(color-theme-solarized-dark
|
2011-04-11 18:16:17 +02:00
|
|
|
"Solarized Dark"
|
2011-04-25 02:00:05 +02:00
|
|
|
,solarized-description))
|
2011-04-11 18:16:17 +02:00
|
|
|
|
2011-04-06 04:20:27 +02:00
|
|
|
(provide 'color-theme-solarized)
|