diff options
| author | Chong Yidong | 2013-12-18 16:53:22 +0800 |
|---|---|---|
| committer | Chong Yidong | 2013-12-18 16:53:22 +0800 |
| commit | a7ee9424b028b9dfd7a632aba73a93c1854e177a (patch) | |
| tree | f30b61bfd37162aec46911da55ad0710eab4a0b8 | |
| parent | 8f942537eb2c23fef15c6a335f2102cb0ce76ec4 (diff) | |
| download | emacs-a7ee9424b028b9dfd7a632aba73a93c1854e177a.tar.gz emacs-a7ee9424b028b9dfd7a632aba73a93c1854e177a.zip | |
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
| -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 @@ | |||
| 1 | 2013-12-18 Chong Yidong <cyd@gnu.org> | 1 | 2013-12-18 Chong Yidong <cyd@gnu.org> |
| 2 | 2 | ||
| 3 | * custom.el (custom-push-theme): If custom--inhibit-theme-enable | ||
| 4 | is non-nil, do not create a new entry in the symbol's theme-value | ||
| 5 | or theme-face property; update theme-settings only (Bug#14664). | ||
| 6 | |||
| 3 | * cus-theme.el (custom-new-theme-mode-map): Add bindings | 7 | * cus-theme.el (custom-new-theme-mode-map): Add bindings |
| 4 | (Bug#15674). | 8 | (Bug#15674). |
| 5 | 9 | ||
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." | |||
| 869 | (setcar (cdr setting) value))) | 869 | (setcar (cdr setting) value))) |
| 870 | ;; Add a new setting: | 870 | ;; Add a new setting: |
| 871 | (t | 871 | (t |
| 872 | (unless old | 872 | (unless custom--inhibit-theme-enable |
| 873 | ;; If the user changed a variable outside of Customize, save | 873 | (unless old |
| 874 | ;; the value to a fake theme, `changed'. If the theme is | 874 | ;; If the user changed a variable outside of Customize, save |
| 875 | ;; later disabled, we use this to bring back the old value. | 875 | ;; the value to a fake theme, `changed'. If the theme is |
| 876 | ;; | 876 | ;; later disabled, we use this to bring back the old value. |
| 877 | ;; For faces, we just use `face-new-frame-defaults' to | 877 | ;; |
| 878 | ;; recompute when the theme is disabled. | 878 | ;; For faces, we just use `face-new-frame-defaults' to |
| 879 | (when (and (eq prop 'theme-value) | 879 | ;; recompute when the theme is disabled. |
| 880 | (boundp symbol)) | 880 | (when (and (eq prop 'theme-value) |
| 881 | (let ((sv (get symbol 'standard-value)) | 881 | (boundp symbol)) |
| 882 | (val (symbol-value symbol))) | 882 | (let ((sv (get symbol 'standard-value)) |
| 883 | (unless (and sv (equal (eval (car sv)) val)) | 883 | (val (symbol-value symbol))) |
| 884 | (setq old `((changed ,(custom-quote val)))))))) | 884 | (unless (and sv (equal (eval (car sv)) val)) |
| 885 | (put symbol prop (cons (list theme value) old)) | 885 | (setq old `((changed ,(custom-quote val)))))))) |
| 886 | (put symbol prop (cons (list theme value) old))) | ||
| 886 | (put theme 'theme-settings | 887 | (put theme 'theme-settings |
| 887 | (cons (list prop symbol theme value) theme-settings)))))) | 888 | (cons (list prop symbol theme value) theme-settings)))))) |
| 888 | 889 | ||