Colors: Improved resetting of rainbow-identifiers transient-state

Now reverts lightness and saturation to the user's fallback defaults.

A suggested future improvement: Revert to whatever would be used
for the current theme, so that it is a true "reset". Such a change
would require decoupling the sat&light code in "colors//tweak-theme-colors".
This commit is contained in:
SteveJobzniak 2016-12-08 00:28:52 +01:00 committed by Eivind Fonn
parent 7bff2fddad
commit a6b1da5624
1 changed files with 4 additions and 4 deletions

View File

@ -78,9 +78,9 @@ Press any other key to exit." component (eval var) component component)))
(colors//change-color-component-func "saturation" -5))
(defun colors/change-color-saturation-reset ()
"Reset the saturation to 100."
"Reset the saturation to default."
(interactive)
(colors//change-color-component-func "saturation" 100 t))
(colors//change-color-component-func "saturation" colors-default-rainbow-identifiers-sat t))
(defun colors/start-change-color-lightness ()
"Initiate the overlay map to change the lightness."
@ -98,9 +98,9 @@ Press any other key to exit." component (eval var) component component)))
(colors//change-color-component-func "lightness" -5))
(defun colors/change-color-lightness-reset ()
"Reset the lightness to 40."
"Reset the lightness to default."
(interactive)
(colors//change-color-component-func "lightness" 40 t))
(colors//change-color-component-func "lightness" colors-default-rainbow-identifiers-light t))
(defun colors//change-color-component-func
(component inc &optional reset)