diff options
Diffstat (limited to 'lisp/cus-theme.el')
-rw-r--r-- | lisp/cus-theme.el | 15 |
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 |