Open
Description
I'm a novice with emacs and lisp, so pardon me in advance for my ignorance. As mentioned in the readme, I called prism-randomize-colors
and then prism-save-colors
, but instead of saving the current color scheme, it resets the color scheme to the result of calling prism-set-colors
.
I'm trying to figure out why this is happening, and it appears that in prism-set-colors
,
...
(set-vars prism-faces (faces colors)
prism-faces-strings (faces colors "strings" strings-fn)
prism-faces-comments (faces colors "comments" comments-fn)
prism-faces-parens (faces colors "parens" parens-fn)))
(when (and save (not local))
;; Save arguments for later saving as customized variables,
;; including the unmodified (but shuffled) colors.
(setf prism-colors colors
prism-desaturations desaturations
prism-lightens lightens
prism-num-faces num
prism-comments-fn comments-fn
prism-strings-fn strings-fn
prism-parens-fn parens-fn)
(prism-save-colors)))))
that when the save
parameter isn't true, prism-set-colors
doesn't set prism-color
, prism-desaturations
, etc., but, prism-save-colors
assumes those variables are set:
(cl-letf (((symbol-function 'custom-save-all)
(symbol-function 'ignore)))
;; Avoid saving the file for each variable, which is very slow.
;; Save it once at the end.
(dolist (var (list 'prism-desaturations 'prism-lightens 'prism-num-faces
'prism-comments-fn 'prism-strings-fn))
(customize-save-variable var (symbol-value var))))
(customize-save-variable 'prism-colors prism-colors))