nashamri / spacemacs-theme

Light and dark theme for spacemacs that supports GUI and terminal
GNU General Public License v3.0
600 stars 113 forks source link

Color represented by variable "var" cannot be given a custom value #151

Closed madalu closed 5 years ago

madalu commented 5 years ago

Commit 82234551 (referenced in issue #139) made it possible to set custom colors via a cl-loop:

(cl-loop for (var . val) in spacemacs-theme-custom-colors
         do (set var val))

However, the locally bound "var" in the in cl-loop makes it impossible to change the color of the "var" previously defined in the function on line 145:

    (var           (if (eq variant 'dark) (if (true-color-p) "#7590db" "#8787d7") (if (true-color-p) "#715ab1" "#af5fd7")))

Because of the overlapping variable names, the value of "var" will remain the value set by spacemacs, even if the custom theme tries to change it. As a result, custom themes such as ewal-spacemacs cannot change the color of several faces, such as font-lock-variable-name-face.

This issue could be easily fixed by changing the variable inside the cl-loop from var to something (e.g., "cvar", "v", etc.) that does not conflict with any of the variables spacemacs uses to define colors.

nashamri commented 5 years ago

And you already fixed it @madalu. Good job and thank you for this :clap: