Autoload adding to custom-theme-load-path

This commit is contained in:
Maciej Mazur 2012-03-02 19:08:19 +01:00
parent ca29827639
commit d2e43b8291
5 changed files with 16 additions and 19 deletions

View File

@ -1 +1 @@
(define-package "color-theme-solarized" "%%version%%" "Solarized themes for Emacs" '((color-theme "6.5.5")))
(define-package "color-theme-solarized" "%%version%%" "Solarized themes for Emacs")

View File

@ -29,7 +29,7 @@ Ported to Emacs by Greg Pfeil, http://ethanschoonover.com/solarized."
(let* ((definitions (solarized-color-definitions mode))
(faces (first definitions))
(variables (second definitions)))
(solarized-color-definitions mode)
(solarized-color-definitions mode)
`(,(intern (concat "color-theme-solarized-" (symbol-name mode)))
,variables
,@faces))))
@ -44,6 +44,7 @@ Ported to Emacs by Greg Pfeil, http://ethanschoonover.com/solarized."
(interactive)
(color-theme-solarized 'light))
(add-to-list 'color-themes
`(color-theme-solarized-light
"Solarized Light"

View File

@ -2,6 +2,4 @@
(locate-file "solarized-definitions.el" custom-theme-load-path
'("c" "")))
(load-into-load-path)
(create-solarized-theme dark)

View File

@ -85,14 +85,14 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further."
(defun solarized-color-definitions (mode)
(flet ((find-color (name)
(let ((index (if window-system
(if solarized-degrade
3
(if solarized-broken-srgb 2 1))
(if (= solarized-termcolors 256)
3
4))))
(nth index (assoc name solarized-colors)))))
(let ((index (if window-system
(if solarized-degrade
3
(if solarized-broken-srgb 2 1))
(if (= solarized-termcolors 256)
3
4))))
(nth index (assoc name solarized-colors)))))
(let ((base03 (find-color 'base03))
(base02 (find-color 'base02))
(base01 (find-color 'base01))
@ -144,7 +144,7 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further."
(bg-violet `(:background ,violet))
(bg-blue `(:background ,blue))
(bg-cyan `(:background ,cyan))
(fg-base03 `(:foreground ,base03))
(fg-base02 `(:foreground ,base02))
(fg-base01 `(:foreground ,base01))
@ -458,9 +458,9 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further."
(apply 'custom-theme-set-faces ',theme-name ',theme-faces)
(provide-theme ',theme-name))))
(defun load-into-load-path ()
(when load-file-name
(add-to-list 'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name)))))
;;;###autoload
(when (boundp 'custom-theme-load-path)
(add-to-list 'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name))))
(provide 'solarized-definitions)

View File

@ -2,6 +2,4 @@
(locate-file "solarized-definitions.el" custom-theme-load-path
'("c" "")))
(load-into-load-path)
(create-solarized-theme light)