aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-06-21 18:32:42 +0000
committerRichard M. Stallman1997-06-21 18:32:42 +0000
commit515c9d0d0876ba4b51809e16f3a0dd80fd822bea (patch)
tree46b622ece944f65f484bdb947cc68232c8514ea4
parent043ee6f6710a4ea766686a02b18189f603e7ebcc (diff)
downloademacs-515c9d0d0876ba4b51809e16f3a0dd80fd822bea.tar.gz
emacs-515c9d0d0876ba4b51809e16f3a0dd80fd822bea.zip
(group-visibility): New widget type.
(widget-group-visibility-create): New function.
-rw-r--r--lisp/wid-edit.el18
1 files changed, 18 insertions, 0 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 898ad25924d..504eda3d8bd 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -2621,6 +2621,24 @@ when he invoked the menu."
2621 (widget-glyph-insert widget on "down" "down-pushed") 2621 (widget-glyph-insert widget on "down" "down-pushed")
2622 (widget-glyph-insert widget off "right" "right-pushed")))) 2622 (widget-glyph-insert widget off "right" "right-pushed"))))
2623 2623
2624(define-widget 'group-visibility 'item
2625 "An indicator and manipulator for hidden group contents."
2626 :format "%[%v%]"
2627 :create 'widget-group-visibility-create
2628 :button-prefix ""
2629 :button-suffix ""
2630 :on "Hide"
2631 :off "Show"
2632 :value-create 'widget-visibility-value-create
2633 :action 'widget-toggle-action
2634 :match (lambda (widget value) t))
2635
2636(defun widget-group-visibility-create (widget)
2637 (let ((visible (widget-value widget)))
2638 (if visible
2639 (insert "--------")))
2640 (widget-default-create widget))
2641
2624;;; The `documentation-link' Widget. 2642;;; The `documentation-link' Widget.
2625;; 2643;;
2626;; This is a helper widget for `documentation-string'. 2644;; This is a helper widget for `documentation-string'.