diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-06-24 03:17:58 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-06-24 03:17:58 +0000 |
commit | 9df27c5f2302989b07475d331bc60ed94fe31e8f (patch) | |
tree | 9ef057cada778541df0946a37c27dea66378f074 /lisp/cus-edit.el | |
parent | 98c8fe94e72b5d70df8e75304f102a53d6036162 (diff) | |
download | emacs-9df27c5f2302989b07475d331bc60ed94fe31e8f.tar.gz |
(custom-group-visibility): Widget type
moved from wid-edit.el and renamed from group-visibility.
(custom-group-visibility-create): Function renamed
and moved from wid-edit.el.
(custom-state-buffer-message): New function.
(custom-mode): Add custom-state-buffer-message to widget-edit-hook.
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r-- | lisp/cus-edit.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index baa2e82a65a..bdf05f2b74b 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2398,6 +2398,16 @@ and so forth. The remaining group tags are shown with (or (nth (1- (widget-get widget :custom-level)) custom-group-tag-faces) 'custom-group-tag-face)) +(define-widget 'custom-group-visibility 'visibility + "An indicator and manipulator for hidden group contents." + :create 'custom-group-visibility-create) + +(defun custom-group-visibility-create (widget) + (let ((visible (widget-value widget))) + (if visible + (insert "--------"))) + (widget-default-create widget)) + (defun custom-group-value-create (widget) "Insert a customize group for WIDGET in the current buffer." (let ((state (widget-get widget :custom-state)) @@ -2979,6 +2989,9 @@ The format is suitable for use with `easy-menu-define'." :type 'hook :group 'custom-buffer ) +(defun custom-state-buffer-message () + (message "To set the value, invoke [State] and choose the Set operation")) + (defun custom-mode () "Major mode for editing customization buffers. @@ -3002,6 +3015,8 @@ if that value is non-nil." (use-local-map custom-mode-map) (easy-menu-add custom-mode-menu) (make-local-variable 'custom-options) + (make-local-hook 'widget-edit-hook) + (add-hook 'widget-edit-hook 'custom-state-buffer-message nil t) (run-hooks 'custom-mode-hook)) ;;; The End. |