diff options
| author | Chong Yidong <cyd@gnu.org> | 2013-12-18 16:53:22 +0800 |
|---|---|---|
| committer | Chong Yidong <cyd@gnu.org> | 2013-12-18 16:53:22 +0800 |
| commit | a7ee9424b028b9dfd7a632aba73a93c1854e177a (patch) | |
| tree | f30b61bfd37162aec46911da55ad0710eab4a0b8 /lisp | |
| parent | 8f942537eb2c23fef15c6a335f2102cb0ce76ec4 (diff) | |
| download | emacs-a7ee9424b028b9dfd7a632aba73a93c1854e177a.tar.gz | |
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
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/custom.el | 29 |
2 files changed, 19 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index db3ec56041b..b4d4eca2f08 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 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 (Bug#15674). diff --git a/lisp/custom.el b/lisp/custom.el index 0df22a8b895..1d00dda0168 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -869,20 +869,21 @@ See `custom-known-themes' for a list of known themes." (setcar (cdr setting) value))) ;; Add a new setting: (t - (unless old - ;; If the user changed a variable outside of Customize, save - ;; 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. - (when (and (eq prop 'theme-value) - (boundp symbol)) - (let ((sv (get symbol 'standard-value)) - (val (symbol-value symbol))) - (unless (and sv (equal (eval (car sv)) val)) - (setq old `((changed ,(custom-quote val)))))))) - (put symbol prop (cons (list theme value) old)) + (unless custom--inhibit-theme-enable + (unless old + ;; If the user changed a variable outside of Customize, save + ;; 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. + (when (and (eq prop 'theme-value) + (boundp symbol)) + (let ((sv (get symbol 'standard-value)) + (val (symbol-value symbol))) + (unless (and sv (equal (eval (car sv)) val)) + (setq old `((changed ,(custom-quote val)))))))) + (put symbol prop (cons (list theme value) old))) (put theme 'theme-settings (cons (list prop symbol theme value) theme-settings)))))) |
