]> code.delx.au - gnu-emacs/commitdiff
(tree-widget-value-create): Save the converted tree :node widget.
authorDavid Ponce <david@dponce.com>
Mon, 19 Sep 2005 09:52:32 +0000 (09:52 +0000)
committerDavid Ponce <david@dponce.com>
Mon, 19 Sep 2005 09:52:32 +0000 (09:52 +0000)
lisp/ChangeLog
lisp/tree-widget.el

index bec58f6f3885fc77450daf7ebb84e6b55598c52f..d0057f55cb4619d63c413683fb3158c402023539 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-19  David Ponce  <david@dponce.com>
+
+       * tree-widget.el (tree-widget-value-create): Save the converted
+       tree :node widget.
+
 2005-09-19  Juanma Barranquero  <lekktu@gmail.com>
 
        * progmodes/sh-script.el (sh-blink): Fix spurious reference to
index 049999a7b88809f5041e3e40bf408ae2598bf587..28207436688b87fdcf89dfc02bae65c6906cda69 100644 (file)
@@ -647,14 +647,15 @@ This hook should be local in the buffer setup to display widgets.")
           (when (and (not args) xpandr)
             (setq args (mapcar 'widget-convert (funcall xpandr tree)))
             (widget-put tree :args args))
+          ;; Defer the node widget creation after icon creation.
+          (widget-put tree :node (widget-convert node))
           ;; Create the icon widget for the expanded tree.
           (push (widget-create-child-and-convert
-                 tree (widget-get tree (if args :open-icon :empty-icon))
-                 ;; At this point the node widget isn't yet created.
-                 :node (setq node (widget-convert node)))
+                 tree (widget-get tree (if args :open-icon :empty-icon)))
                 buttons)
           ;; Create the tree node widget.
-          (push (widget-create-child tree node) children)
+          (push (widget-create-child tree (widget-get tree :node))
+                children)
           ;; Update the icon :node with the created node widget.
           (widget-put (car buttons) :node (car children))
           ;; Create the tree children.
@@ -696,14 +697,15 @@ This hook should be local in the buffer setup to display widgets.")
               ;; Update the icon :node with the created node widget.
               (widget-put (car buttons) :node (car children)))))
 ;;;; Collapsed node.
+      ;; Defer the node widget creation after icon creation.
+      (widget-put tree :node (widget-convert node))
       ;; Create the icon widget for the collapsed tree.
       (push (widget-create-child-and-convert
-             tree (widget-get tree :close-icon)
-             ;; At this point the node widget isn't yet created.
-             :node (setq node (widget-convert node)))
+             tree (widget-get tree :close-icon))
             buttons)
       ;; Create the tree node widget.
-      (push (widget-create-child tree node) children)
+      (push (widget-create-child tree (widget-get tree :node))
+            children)
       ;; Update the icon :node with the created node widget.
       (widget-put (car buttons) :node (car children)))
     ;; Save widget children and buttons.  The tree-widget :node child