diff options
| author | David Ponce | 2005-09-19 09:52:32 +0000 |
|---|---|---|
| committer | David Ponce | 2005-09-19 09:52:32 +0000 |
| commit | 4ff094a82632223f032d3e9f17cf4b4d82706ae8 (patch) | |
| tree | c9f2aef2ba8d620fe7f1afb3907ba8e8d447a098 | |
| parent | 900d169800451cbe59c151fc5d7043c6d98e449f (diff) | |
| download | emacs-4ff094a82632223f032d3e9f17cf4b4d82706ae8.tar.gz emacs-4ff094a82632223f032d3e9f17cf4b4d82706ae8.zip | |
(tree-widget-value-create): Save the converted tree :node widget.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/tree-widget.el | 18 |
2 files changed, 15 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bec58f6f388..d0057f55cb4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-09-19 David Ponce <david@dponce.com> | ||
| 2 | |||
| 3 | * tree-widget.el (tree-widget-value-create): Save the converted | ||
| 4 | tree :node widget. | ||
| 5 | |||
| 1 | 2005-09-19 Juanma Barranquero <lekktu@gmail.com> | 6 | 2005-09-19 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * progmodes/sh-script.el (sh-blink): Fix spurious reference to | 8 | * progmodes/sh-script.el (sh-blink): Fix spurious reference to |
diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el index 049999a7b88..28207436688 100644 --- a/lisp/tree-widget.el +++ b/lisp/tree-widget.el | |||
| @@ -647,14 +647,15 @@ This hook should be local in the buffer setup to display widgets.") | |||
| 647 | (when (and (not args) xpandr) | 647 | (when (and (not args) xpandr) |
| 648 | (setq args (mapcar 'widget-convert (funcall xpandr tree))) | 648 | (setq args (mapcar 'widget-convert (funcall xpandr tree))) |
| 649 | (widget-put tree :args args)) | 649 | (widget-put tree :args args)) |
| 650 | ;; Defer the node widget creation after icon creation. | ||
| 651 | (widget-put tree :node (widget-convert node)) | ||
| 650 | ;; Create the icon widget for the expanded tree. | 652 | ;; Create the icon widget for the expanded tree. |
| 651 | (push (widget-create-child-and-convert | 653 | (push (widget-create-child-and-convert |
| 652 | tree (widget-get tree (if args :open-icon :empty-icon)) | 654 | tree (widget-get tree (if args :open-icon :empty-icon))) |
| 653 | ;; At this point the node widget isn't yet created. | ||
| 654 | :node (setq node (widget-convert node))) | ||
| 655 | buttons) | 655 | buttons) |
| 656 | ;; Create the tree node widget. | 656 | ;; Create the tree node widget. |
| 657 | (push (widget-create-child tree node) children) | 657 | (push (widget-create-child tree (widget-get tree :node)) |
| 658 | children) | ||
| 658 | ;; Update the icon :node with the created node widget. | 659 | ;; Update the icon :node with the created node widget. |
| 659 | (widget-put (car buttons) :node (car children)) | 660 | (widget-put (car buttons) :node (car children)) |
| 660 | ;; Create the tree children. | 661 | ;; Create the tree children. |
| @@ -696,14 +697,15 @@ This hook should be local in the buffer setup to display widgets.") | |||
| 696 | ;; Update the icon :node with the created node widget. | 697 | ;; Update the icon :node with the created node widget. |
| 697 | (widget-put (car buttons) :node (car children))))) | 698 | (widget-put (car buttons) :node (car children))))) |
| 698 | ;;;; Collapsed node. | 699 | ;;;; Collapsed node. |
| 700 | ;; Defer the node widget creation after icon creation. | ||
| 701 | (widget-put tree :node (widget-convert node)) | ||
| 699 | ;; Create the icon widget for the collapsed tree. | 702 | ;; Create the icon widget for the collapsed tree. |
| 700 | (push (widget-create-child-and-convert | 703 | (push (widget-create-child-and-convert |
| 701 | tree (widget-get tree :close-icon) | 704 | tree (widget-get tree :close-icon)) |
| 702 | ;; At this point the node widget isn't yet created. | ||
| 703 | :node (setq node (widget-convert node))) | ||
| 704 | buttons) | 705 | buttons) |
| 705 | ;; Create the tree node widget. | 706 | ;; Create the tree node widget. |
| 706 | (push (widget-create-child tree node) children) | 707 | (push (widget-create-child tree (widget-get tree :node)) |
| 708 | children) | ||
| 707 | ;; Update the icon :node with the created node widget. | 709 | ;; Update the icon :node with the created node widget. |
| 708 | (widget-put (car buttons) :node (car children))) | 710 | (widget-put (car buttons) :node (car children))) |
| 709 | ;; Save widget children and buttons. The tree-widget :node child | 711 | ;; Save widget children and buttons. The tree-widget :node child |