Commit a7ee9424 authored by Chong Yidong's avatar Chong Yidong
Browse files

Fix loading of themes when NO-ENABLE is t.

* lisp/custom.el (custom-push-theme): If custom--inhibit-theme-enable
is non-nil, do not create a new entry in the symbol's theme-value
or theme-face property; update theme-settings only.

Fixes: debbugs:14664
parent 8f942537
2013-12-18 Chong Yidong <cyd@gnu.org> 2013-12-18 Chong Yidong <cyd@gnu.org>
* custom.el (custom-push-theme): If custom--inhibit-theme-enable
is non-nil, do not create a new entry in the symbol's theme-value
or theme-face property; update theme-settings only (Bug#14664).
* cus-theme.el (custom-new-theme-mode-map): Add bindings * cus-theme.el (custom-new-theme-mode-map): Add bindings
(Bug#15674). (Bug#15674).
......
...@@ -869,20 +869,21 @@ See `custom-known-themes' for a list of known themes." ...@@ -869,20 +869,21 @@ See `custom-known-themes' for a list of known themes."
(setcar (cdr setting) value))) (setcar (cdr setting) value)))
;; Add a new setting: ;; Add a new setting:
(t (t
(unless old (unless custom--inhibit-theme-enable
;; If the user changed a variable outside of Customize, save (unless old
;; the value to a fake theme, `changed'. If the theme is ;; If the user changed a variable outside of Customize, save
;; later disabled, we use this to bring back the old value. ;; the value to a fake theme, `changed'. If the theme is
;; ;; later disabled, we use this to bring back the old value.
;; For faces, we just use `face-new-frame-defaults' to ;;
;; recompute when the theme is disabled. ;; For faces, we just use `face-new-frame-defaults' to
(when (and (eq prop 'theme-value) ;; recompute when the theme is disabled.
(boundp symbol)) (when (and (eq prop 'theme-value)
(let ((sv (get symbol 'standard-value)) (boundp symbol))
(val (symbol-value symbol))) (let ((sv (get symbol 'standard-value))
(unless (and sv (equal (eval (car sv)) val)) (val (symbol-value symbol)))
(setq old `((changed ,(custom-quote val)))))))) (unless (and sv (equal (eval (car sv)) val))
(put symbol prop (cons (list theme value) old)) (setq old `((changed ,(custom-quote val))))))))
(put symbol prop (cons (list theme value) old)))
(put theme 'theme-settings (put theme 'theme-settings
(cons (list prop symbol theme value) theme-settings)))))) (cons (list prop symbol theme value) theme-settings))))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment