diff options
| author | Chong Yidong | 2010-10-19 15:22:40 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-10-19 15:22:40 -0400 |
| commit | 7fd8732d2e6f45077fe496bc36838b1b86a3171d (patch) | |
| tree | 90b73316383bef93c65d004899977fdacf7434d4 | |
| parent | 3f12b18cb57c5cb2a11706ba87fdbb20aa0d6301 (diff) | |
| download | emacs-7fd8732d2e6f45077fe496bc36838b1b86a3171d.tar.gz emacs-7fd8732d2e6f45077fe496bc36838b1b86a3171d.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/cus-face.el | 2 | ||||
| -rw-r--r-- | lisp/custom.el | 9 |
3 files changed, 17 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aae1e0e81c0..14691b44373 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2010-10-19 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * cus-face.el (custom-theme-set-faces): Revert 2010-10-18 change. | ||
| 4 | Don't mark as safe. | ||
| 5 | |||
| 6 | * custom.el (custom-theme-set-variables): Likewise. | ||
| 7 | (load-theme): Add custom-theme-set-faces and | ||
| 8 | custom-theme-set-variables to safe-functions while loading. | ||
| 9 | (custom-enabled-themes): Mark as risky. | ||
| 10 | |||
| 1 | 2010-10-18 Julien Danjou <julien@danjou.info> | 11 | 2010-10-18 Julien Danjou <julien@danjou.info> |
| 2 | 12 | ||
| 3 | * bindings.el: Remove end dashes in default mode-line-format. | 13 | * bindings.el: Remove end dashes in default mode-line-format. |
diff --git a/lisp/cus-face.el b/lisp/cus-face.el index fd6db787d32..ebb20012afa 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el | |||
| @@ -349,8 +349,6 @@ FACE's list property `theme-face' \(using `custom-push-theme')." | |||
| 349 | (put face 'face-override-spec nil) | 349 | (put face 'face-override-spec nil) |
| 350 | (face-spec-set face spec t)))))))) | 350 | (face-spec-set face spec t)))))))) |
| 351 | 351 | ||
| 352 | (put 'custom-theme-set-faces 'safe-function t) | ||
| 353 | |||
| 354 | ;; XEmacs compability function. In XEmacs, when you reset a Custom | 352 | ;; XEmacs compability function. In XEmacs, when you reset a Custom |
| 355 | ;; Theme, you have to specify the theme to reset it to. We just apply | 353 | ;; Theme, you have to specify the theme to reset it to. We just apply |
| 356 | ;; the next theme. | 354 | ;; the next theme. |
diff --git a/lisp/custom.el b/lisp/custom.el index 8a7739d1be4..bcb78e46a3c 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -993,8 +993,6 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')." | |||
| 993 | (and (or now (default-boundp symbol)) | 993 | (and (or now (default-boundp symbol)) |
| 994 | (put symbol 'variable-comment comment))))))) | 994 | (put symbol 'variable-comment comment))))))) |
| 995 | 995 | ||
| 996 | (put 'custom-theme-set-variables 'safe-function t) | ||
| 997 | |||
| 998 | 996 | ||
| 999 | ;;; Defining themes. | 997 | ;;; Defining themes. |
| 1000 | 998 | ||
| @@ -1107,6 +1105,8 @@ property `theme-feature' (which is usually a symbol created by | |||
| 1107 | (let ((custom-enabling-themes t)) | 1105 | (let ((custom-enabling-themes t)) |
| 1108 | (enable-theme 'user)))) | 1106 | (enable-theme 'user)))) |
| 1109 | 1107 | ||
| 1108 | (defvar safe-functions) ; From unsafep.el | ||
| 1109 | |||
| 1110 | (defun load-theme (theme &optional no-enable) | 1110 | (defun load-theme (theme &optional no-enable) |
| 1111 | "Load a theme's settings from its file. | 1111 | "Load a theme's settings from its file. |
| 1112 | Normally, this also enables the theme; use `disable-theme' to | 1112 | Normally, this also enables the theme; use `disable-theme' to |
| @@ -1135,7 +1135,11 @@ the theme." | |||
| 1135 | ;; Instead of simply loading the theme file, read it manually. | 1135 | ;; Instead of simply loading the theme file, read it manually. |
| 1136 | (with-temp-buffer | 1136 | (with-temp-buffer |
| 1137 | (insert-file-contents fn) | 1137 | (insert-file-contents fn) |
| 1138 | (require 'unsafep) | ||
| 1138 | (let ((custom--inhibit-theme-enable no-enable) | 1139 | (let ((custom--inhibit-theme-enable no-enable) |
| 1140 | (safe-functions (append '(custom-theme-set-variables | ||
| 1141 | custom-theme-set-faces) | ||
| 1142 | safe-functions)) | ||
| 1139 | form scar) | 1143 | form scar) |
| 1140 | (while (setq form (let ((read-circle nil)) | 1144 | (while (setq form (let ((read-circle nil)) |
| 1141 | (condition-case nil | 1145 | (condition-case nil |
| @@ -1234,6 +1238,7 @@ and always takes precedence over other Custom Themes." | |||
| 1234 | :group 'customize | 1238 | :group 'customize |
| 1235 | :type '(repeat symbol) | 1239 | :type '(repeat symbol) |
| 1236 | :set-after '(custom-theme-directory custom-theme-load-path) | 1240 | :set-after '(custom-theme-directory custom-theme-load-path) |
| 1241 | :risky t | ||
| 1237 | :set (lambda (symbol themes) | 1242 | :set (lambda (symbol themes) |
| 1238 | ;; Avoid an infinite loop when custom-enabled-themes is | 1243 | ;; Avoid an infinite loop when custom-enabled-themes is |
| 1239 | ;; defined in a theme (e.g. `user'). Enabling the theme sets | 1244 | ;; defined in a theme (e.g. `user'). Enabling the theme sets |