summaryrefslogtreecommitdiff
path: root/lisp/help-mode.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-10-11 23:10:21 -0400
committerChong Yidong <cyd@stupidchicken.com>2010-10-11 23:10:21 -0400
commit6b09b5d118f2870e54a385f6ecd03cbf4508e120 (patch)
tree2c4523afdc963fe1628268773be8f46bff1c4a9a /lisp/help-mode.el
parent57b6ae53514ccef149507cfd5f53d2e418810d30 (diff)
downloademacs-6b09b5d118f2870e54a385f6ecd03cbf4508e120.tar.gz
New interface for choosing Custom themes.
* lisp/cus-edit.el (custom--initialize-widget-variables): New function. (Custom-mode): Use it. * lisp/cus-face.el (custom-theme-set-faces): Remove dead code. Obey custom--inhibit-theme-enable. * lisp/cus-theme.el (describe-theme, customize-themes) (custom-theme-save): New commands. (custom-new-theme-mode-map): Bind C-x C-s. (custom-new-theme-mode): Use custom--initialize-widget-variables. (customize-create-theme): New optional arg THEME. (custom-theme-revert): Use it. (custom-theme-visit-theme): Remove dead code. (custom-theme-merge-theme): Use custom-available-themes. (custom-theme-write): Make interactive. (custom-theme-write): Use custom-theme-name-valid-p. (describe-theme-1, custom-theme-choose-revert) (custom-theme-checkbox-toggle, custom-theme-selections-toggle): New funs. (custom-theme-allow-multiple-selections): New option. (custom-theme-choose-mode): New major mode. * lisp/custom.el (custom-theme-set-variables): Remove dead code. Obey custom--inhibit-theme-enable. (custom--inhibit-theme-enable): New var. (provide-theme): Obey it. (load-theme): Replace load with manual read/eval, in order to check for correctness. Use custom-theme-name-valid-p. (custom-theme-name-valid-p): New function. (custom-available-themes): Use it. * lisp/help-mode.el (help-theme-def, help-theme-edit): New buttons.
Diffstat (limited to 'lisp/help-mode.el')
-rw-r--r--lisp/help-mode.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 9d10d5170ba..9f54ff08c0b 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -255,6 +255,15 @@ The format is (FUNCTION ARGS...).")
'help-function (lambda (file) (dired file))
'help-echo (purecopy "mouse-2, RET: visit package directory"))
+(define-button-type 'help-theme-def
+ :supertype 'help-xref
+ 'help-function 'find-file
+ 'help-echo (purecopy "mouse-2, RET: visit theme file"))
+
+(define-button-type 'help-theme-edit
+ :supertype 'help-xref
+ 'help-function 'customize-create-theme
+ 'help-echo (purecopy "mouse-2, RET: edit this theme file"))
;;;###autoload
(defun help-mode ()