rainbow-identifiers: do not overwrite theme values

This commit is contained in:
ksjogo 2016-06-08 15:18:04 +02:00 committed by syl20bnr
parent 2b44ce33a2
commit dd5836d948
1 changed files with 9 additions and 6 deletions

View File

@ -21,12 +21,15 @@
"Tweak color themes by adjusting rainbow-identifiers."
(interactive)
;; tweak the saturation and lightness of identifier colors
(let ((sat&light (assq theme colors-theme-identifiers-sat&light)))
(if sat&light
(setq rainbow-identifiers-cie-l*a*b*-saturation (cadr sat&light)
rainbow-identifiers-cie-l*a*b*-lightness (caddr sat&light))
(setq rainbow-identifiers-cie-l*a*b*-saturation 80
rainbow-identifiers-cie-l*a*b*-lightness 45))))
(when (not (assq theme (get 'rainbow-identifiers-cie-l*a*b*-saturation
'theme-value)))
(let ((sat&light (assq theme colors-theme-identifiers-sat&light)))
(if sat&light
(setq rainbow-identifiers-cie-l*a*b*-saturation (cadr sat&light)
rainbow-identifiers-cie-l*a*b*-lightness (caddr sat&light))
;; default
(setq rainbow-identifiers-cie-l*a*b*-saturation 80
rainbow-identifiers-cie-l*a*b*-lightness 45)))))
(defun colors//change-color-mini-mode-doc (component)
"Display a short documentation in the mini buffer."