From 0448233577f904d83506626769878cd576120a6e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 5 Jan 2012 19:12:11 +0800 Subject: 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. --- lisp/cus-theme.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'lisp/cus-theme.el') 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 -- cgit v1.2.1