Fix saving multiple themes

* lisp/custom.el (enable-theme): Be side-effect free when modifying
custom-enabled-themes.  (Bug#19999)
This commit is contained in:
Mauro Aranda 2020-01-06 11:04:29 -03:00 committed by Eli Zaretskii
parent c556aabde8
commit d6f9b09777

View file

@ -1381,7 +1381,7 @@ function runs. To disable other themes, use `disable-theme'."
(custom-theme-recalc-variable symbol)))))))
(unless (eq theme 'user)
(setq custom-enabled-themes
(cons theme (delq theme custom-enabled-themes)))
(cons theme (remq theme custom-enabled-themes)))
;; Give the `user' theme the highest priority.
(enable-theme 'user)))