Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (48 sloc) 1.8 KB
;;; Author: Ethan Schoonover, Solarized; Greg Pfeil, Emacs adaptation
;;; URL:
;;; This file is not (YET) part of GNU Emacs.
;;; # Usage
;;; 1. Install the color-theme package
;;; (
;;; 2. Load this file
;;; 3. M-x color-theme-solarized-[dark|light]
(let ((current-file-name (or load-file-name buffer-file-name)))
(if current-file-name
(let* ((reqname (concat (file-name-directory current-file-name)
(compreqname (concat reqname "c")))
(require 'solarized-definitions
(if (file-exists-p compreqname) compreqname reqname)))
(require 'solarized-definitions)))
(require 'color-theme))
(defun color-theme-solarized (mode)
"Color theme by Ethan Schoonover, created 2011-03-24.
Ported to Emacs by Greg Pfeil,"
(interactive "Slight or dark? ")
(let* ((definitions (solarized-color-definitions mode))
(faces (first definitions))
(variables (second definitions)))
(solarized-color-definitions mode)
`(,(intern (concat "color-theme-solarized-" (symbol-name mode)))
(defun color-theme-solarized-dark ()
(color-theme-solarized 'dark))
(defun color-theme-solarized-light ()
(color-theme-solarized 'light))
(add-to-list 'color-themes
"Solarized Light"
(add-to-list 'color-themes
"Solarized Dark"
(provide 'color-theme-solarized)