diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-10-19 15:22:40 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-10-19 15:22:40 -0400 |
commit | 7fd8732d2e6f45077fe496bc36838b1b86a3171d (patch) | |
tree | 90b73316383bef93c65d004899977fdacf7434d4 /lisp/custom.el | |
parent | 3f12b18cb57c5cb2a11706ba87fdbb20aa0d6301 (diff) |
Revert 2010-10-18 change; use safe-functions instead.
* cus-face.el (custom-theme-set-faces): Revert 2010-10-18 change.
Don't mark as safe.
* custom.el (custom-theme-set-variables): Likewise.
(load-theme): Add custom-theme-set-faces and
custom-theme-set-variables to safe-functions while loading.
(custom-enabled-themes): Mark as risky.
Diffstat (limited to 'lisp/custom.el')
-rw-r--r-- | lisp/custom.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/custom.el b/lisp/custom.el index 8a7739d1be..bcb78e46a3 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -993,8 +993,6 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')." (and (or now (default-boundp symbol)) (put symbol 'variable-comment comment))))))) -(put 'custom-theme-set-variables 'safe-function t) - ;;; Defining themes. @@ -1107,6 +1105,8 @@ property `theme-feature' (which is usually a symbol created by (let ((custom-enabling-themes t)) (enable-theme 'user)))) +(defvar safe-functions) ; From unsafep.el + (defun load-theme (theme &optional no-enable) "Load a theme's settings from its file. Normally, this also enables the theme; use `disable-theme' to @@ -1135,7 +1135,11 @@ the theme." ;; Instead of simply loading the theme file, read it manually. (with-temp-buffer (insert-file-contents fn) + (require 'unsafep) (let ((custom--inhibit-theme-enable no-enable) + (safe-functions (append '(custom-theme-set-variables + custom-theme-set-faces) + safe-functions)) form scar) (while (setq form (let ((read-circle nil)) (condition-case nil @@ -1234,6 +1238,7 @@ and always takes precedence over other Custom Themes." :group 'customize :type '(repeat symbol) :set-after '(custom-theme-directory custom-theme-load-path) + :risky t :set (lambda (symbol themes) ;; Avoid an infinite loop when custom-enabled-themes is ;; defined in a theme (e.g. `user'). Enabling the theme sets |