# HG changeset patch # User Richard M. Stallman # Date 867122278 0 # Node ID a8ae9c65369651c6060f9f417cbc461d46628963 # Parent 8326843eefd920db1e8b3a7b535d321492683074 (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. diff -r 8326843eefd9 -r a8ae9c653696 lisp/cus-edit.el --- a/lisp/cus-edit.el Tue Jun 24 03:17:34 1997 +0000 +++ b/lisp/cus-edit.el Tue Jun 24 03:17:58 1997 +0000 @@ -2398,6 +2398,16 @@ (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 @@ :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 @@ (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.