summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-06-24 03:17:34 +0000
committerRichard M. Stallman <rms@gnu.org>1997-06-24 03:17:34 +0000
commit98c8fe94e72b5d70df8e75304f102a53d6036162 (patch)
treec7c98b2a04b2cb6fb101f0c6f2bd34a5f97cb3f0
parentc8793f27946816f74e5a4e2d4085910c40bb6791 (diff)
downloademacs-98c8fe94e72b5d70df8e75304f102a53d6036162.tar.gz
(widget-edit-hook): New variable.
(widget-field-action, widget-choice-action): Run that hook instead of displaying an echo area message. (widget-toggle-action): Likewise. (group-visibility, widget-group-visibility-create): Moved to cus-edit.el and renamed.
-rw-r--r--lisp/wid-edit.el18
1 files changed, 5 insertions, 13 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 7750fd74094..1a445d57321 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1716,10 +1716,12 @@ If END is omitted, it defaults to the length of LIST."
:prompt-internal prompt initial history)))
(widget-apply widget :value-to-external answer))))
+(defvar widget-edit-hook nil)
+
(defun widget-field-action (widget &optional event)
;; Move to next field.
(widget-forward 1)
- (message "To set the value, invoke [State] and choose the Set operation"))
+ (run-hooks 'widget-edit-hook))
(defun widget-field-validate (widget)
;; Valid if the content matches `:valid-regexp'.
@@ -1915,7 +1917,7 @@ when he invoked the menu."
(widget-get current :value)))
(widget-setup)
(widget-apply widget :notify widget event)))
- (message "To set the value, invoke [State] and choose the Set operation"))
+ (run-hooks 'widget-edit-hook))
(defun widget-choice-validate (widget)
;; Valid if we have made a valid choice.
@@ -1971,7 +1973,7 @@ when he invoked the menu."
;; Toggle value.
(widget-value-set widget (not (widget-value widget)))
(widget-apply widget :notify widget event)
- (message "To set the value, invoke [State] and choose the Set operation"))
+ (run-hooks 'widget-edit-hook))
;;; The `checkbox' Widget.
@@ -2631,16 +2633,6 @@ when he invoked the menu."
(widget-glyph-insert widget on "down" "down-pushed")
(widget-glyph-insert widget off "right" "right-pushed"))))
-(define-widget 'group-visibility 'visibility
- "An indicator and manipulator for hidden group contents."
- :create 'widget-group-visibility-create)
-
-(defun widget-group-visibility-create (widget)
- (let ((visible (widget-value widget)))
- (if visible
- (insert "--------")))
- (widget-default-create widget))
-
;;; The `documentation-link' Widget.
;;
;; This is a helper widget for `documentation-string'.