Eliminate create-solarized-theme macro
This was a remnant from having separate solarized-dark and -light themes. We only ever produce one theme now, so use the usual theme definition mechanism.
This commit is contained in:
parent
07199920c7
commit
addd445155
|
@ -823,29 +823,5 @@ contains Solarized symbols."
|
|||
;; haskell
|
||||
(haskell-keyword-face (,@fg-cyan)))))))
|
||||
|
||||
;;;###autoload
|
||||
(when (boundp 'custom-theme-load-path)
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory (file-name-directory load-file-name))))
|
||||
|
||||
(defmacro create-solarized-theme (name description color-definitions)
|
||||
"Define the theme from the provided pieces.
|
||||
NAME is a bare symbol, DESCRIPTION is the text that will be presented to users,
|
||||
and COLOR-DEFINITIONS is the list of face-specs that comprise the theme."
|
||||
`(let ((name ,name)
|
||||
(description ,description)
|
||||
(color-definitions ,color-definitions))
|
||||
(custom-declare-theme name (custom-make-theme-feature name) description)
|
||||
(apply #'custom-theme-set-faces name color-definitions)
|
||||
(custom-theme-set-variables
|
||||
name
|
||||
;; This is obsolete, but something might still be referencing it.
|
||||
'(ansi-color-names-vector
|
||||
,(apply #'vector
|
||||
(mapcar (lambda (color-name)
|
||||
(nth 1 (assoc color-name solarized-colors)))
|
||||
'(base02 red green yellow blue magenta cyan base2)))))
|
||||
(provide-theme name)))
|
||||
|
||||
(provide 'solarized-definitions)
|
||||
;;; solarized-definitions.el ends here
|
||||
|
|
|
@ -1,12 +1,21 @@
|
|||
;; -*- lexical-binding: t; -*-
|
||||
;; solarized-theme.el --- Solarized custom theme -*- lexical-binding: t; -*-
|
||||
|
||||
(require 'solarized-definitions
|
||||
(locate-file "solarized-definitions.el" custom-theme-load-path
|
||||
'("c" "")))
|
||||
|
||||
(create-solarized-theme 'solarized
|
||||
solarized-description
|
||||
(solarized-color-definitions))
|
||||
(deftheme solarized solarized-description)
|
||||
|
||||
(apply #'custom-theme-set-faces 'solarized (solarized-color-definitions))
|
||||
|
||||
(custom-theme-set-variables
|
||||
'solarized
|
||||
;; This is obsolete, but something might still be referencing it.
|
||||
`(ansi-color-names-vector
|
||||
,(apply #'vector
|
||||
(mapcar (lambda (color-name)
|
||||
(nth 1 (assoc color-name solarized-colors)))
|
||||
'(base02 red green yellow blue magenta cyan base2)))))
|
||||
|
||||
(cl-defun solarized-update-background-mode
|
||||
(appearance &optional (frames (frame-list)))
|
||||
|
@ -31,3 +40,11 @@ that observes the background characteristic."
|
|||
('dark 'light)
|
||||
(_ 'dark))))
|
||||
(solarized-update-background-mode new-mode)))
|
||||
|
||||
;;;###autoload
|
||||
(when load-file-name
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory (file-name-directory load-file-name))))
|
||||
|
||||
(provide-theme 'solarized)
|
||||
;;; solarized-theme.el ends here
|
||||
|
|
Loading…
Reference in New Issue