diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2011-03-21 00:30:55 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2011-03-21 00:30:55 -0400 |
commit | 4359915b869931b94d530d9c6e1347f260d66951 (patch) | |
tree | 0f1e0bfe3a37358c98fe4f1d4d63d597a13ea84a /lisp/cus-theme.el | |
parent | 99ea4cd9ea18070cd2d8bd1e6a34ae05db7213e1 (diff) | |
download | emacs-4359915b869931b94d530d9c6e1347f260d66951.tar.gz |
Several fixes to cus-theme.el.
* lisp/cus-theme.el: Add missing provide statement.
(customize-create-theme): Extract theme value correctly.
(custom-theme-visit-theme): Autoload.
(customize-create-theme): Prompt before inserting default faces.
Diffstat (limited to 'lisp/cus-theme.el')
-rw-r--r-- | lisp/cus-theme.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index cdc066aa91a..4f9428d497b 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -100,6 +100,9 @@ named *Custom Theme*." (make-local-variable 'custom-theme-insert-face-marker) (make-local-variable 'custom-theme-insert-variable-marker) (make-local-variable 'custom-theme--listed-faces) + (when (called-interactively-p 'interactive) + (unless (y-or-n-p "Include basic face customizations in this theme? ") + (setq custom-theme--listed-faces nil))) (if (eq theme 'user) (widget-insert "This buffer contains all the Custom settings you have made. @@ -188,7 +191,7 @@ remove them from your saved Custom file.\n\n")) (while vars (if (eq (car vars) 'custom-enabled-themes) (progn (pop vars) (pop values)) - (custom-theme-add-var-1 (pop vars) (pop values))))) + (custom-theme-add-var-1 (pop vars) (eval (pop values)))))) (setq custom-theme-insert-variable-marker (point-marker)) (widget-insert " ") (widget-create 'push-button @@ -297,8 +300,9 @@ SPEC, if non-nil, should be a face spec to which to set the widget." ;;; Reading and writing +;;;###autoload (defun custom-theme-visit-theme (theme) - "Load the custom theme THEME's settings into the current buffer." + "Set up a Custom buffer to edit custom theme THEME." (interactive (list (intern (completing-read "Find custom theme: " @@ -663,4 +667,6 @@ Theme files are named *-theme.el in `")) (widget-toggle-action widget event) (setq custom-theme-allow-multiple-selections (widget-value widget))) +(provide 'cus-theme) + ;;; cus-theme.el ends here |