summaryrefslogtreecommitdiff
path: root/lisp/cus-theme.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-01-05 19:12:11 +0800
committerChong Yidong <cyd@gnu.org>2012-01-05 19:12:11 +0800
commit0448233577f904d83506626769878cd576120a6e (patch)
treefedb3f1d50b6d8fc426d966e7c16f904a34f6263 /lisp/cus-theme.el
parentb0d7d8af0743998f6d9161b28d269e100b415861 (diff)
downloademacs-0448233577f904d83506626769878cd576120a6e.tar.gz
Tweak handling of custom-enabled-themes and custom-safe-themes.
* lisp/cus-theme.el (custom-theme-merge-theme): Ignore custom-enabled-themes and custom-safe-themes. * lisp/custom.el (enable-theme): Don't set custom-safe-themes.
Diffstat (limited to 'lisp/cus-theme.el')
-rw-r--r--lisp/cus-theme.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index e662d8c84c7..6bddb02add6 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -329,11 +329,16 @@ SPEC, if non-nil, should be a face spec to which to set the widget."
(load-theme theme nil t))
(let ((settings (reverse (get theme 'theme-settings))))
(dolist (setting settings)
- (funcall (if (eq (car setting) 'theme-value)
- 'custom-theme-add-variable
- 'custom-theme-add-face)
- (nth 1 setting)
- (nth 3 setting))))
+ (let ((option (eq (car setting) 'theme-value))
+ (name (nth 1 setting))
+ (value (nth 3 setting)))
+ (unless (and option
+ (memq name '(custom-enabled-themes
+ custom-safe-themes)))
+ (funcall (if option
+ 'custom-theme-add-variable
+ 'custom-theme-add-face)
+ name value)))))
theme)
;; From cus-edit.el