Mercurial > emacs
comparison lisp/wid-edit.el @ 28780:6bc5854eef8b
(widget-default-active): Obey `:always-active'.
(widget-documentation-string-value-create): Set `:always-active'.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 02 May 2000 13:42:46 +0000 |
parents | bc335df29000 |
children | 3bb8d5adf524 |
comparison
equal
deleted
inserted
replaced
28779:ac31ccbeef6d | 28780:6bc5854eef8b |
---|---|
1537 (widget-get widget :tag) | 1537 (widget-get widget :tag) |
1538 (widget-princ-to-string (widget-get widget :value)))) | 1538 (widget-princ-to-string (widget-get widget :value)))) |
1539 | 1539 |
1540 (defun widget-default-active (widget) | 1540 (defun widget-default-active (widget) |
1541 "Return t iff this widget active (user modifiable)." | 1541 "Return t iff this widget active (user modifiable)." |
1542 (and (not (widget-get widget :inactive)) | 1542 (or (widget-get widget :always-active) |
1543 (let ((parent (widget-get widget :parent))) | 1543 (and (not (widget-get widget :inactive)) |
1544 (or (null parent) | 1544 (let ((parent (widget-get widget :parent))) |
1545 (widget-apply parent :active))))) | 1545 (or (null parent) |
1546 (widget-apply parent :active)))))) | |
1546 | 1547 |
1547 (defun widget-default-deactivate (widget) | 1548 (defun widget-default-deactivate (widget) |
1548 "Make WIDGET inactive for user modifications." | 1549 "Make WIDGET inactive for user modifications." |
1549 (widget-specify-inactive widget | 1550 (widget-specify-inactive widget |
1550 (widget-get widget :from) | 1551 (widget-get widget :from) |
2858 (widget-documentation-link-add widget start (point)) | 2859 (widget-documentation-link-add widget start (point)) |
2859 (push (widget-create-child-and-convert | 2860 (push (widget-create-child-and-convert |
2860 widget 'visibility | 2861 widget 'visibility |
2861 :help-echo "Show or hide rest of the documentation." | 2862 :help-echo "Show or hide rest of the documentation." |
2862 :off "More" | 2863 :off "More" |
2864 :always-active t | |
2863 :action 'widget-parent-action | 2865 :action 'widget-parent-action |
2864 shown) | 2866 shown) |
2865 buttons) | 2867 buttons) |
2866 (when shown | 2868 (when shown |
2867 (setq start (point)) | 2869 (setq start (point)) |