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

View file

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