From 4d9f2978aad95c0a8547280b4a75ffcf8352a383 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 18 Sep 2009 00:51:12 +0000 Subject: [PATCH] (gud-speedbar-item-info): Adjust for change to gdb-var-list. (gud-speedbar-buttons): Make node expandable if expression "has more" children. --- lisp/progmodes/gud.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index c9c74c1a1db..df50117632a 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -471,8 +471,8 @@ The value t means that there is no stack, and we are in display-file mode.") (defun gud-speedbar-item-info () "Display the data type of the watch expression element." (let ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))) - (if (nth 6 var) - (speedbar-message "%s: %s" (nth 6 var) (nth 3 var)) + (if (nth 7 var) + (speedbar-message "%s: %s" (nth 7 var) (nth 3 var)) (speedbar-message "%s" (nth 3 var))))) (defun gud-install-speedbar-variables () @@ -550,7 +550,8 @@ required by the caller." (let* (char (depth 0) (start 0) (var (car var-list)) (varnum (car var)) (expr (nth 1 var)) (type (if (nth 3 var) (nth 3 var) " ")) - (value (nth 4 var)) (status (nth 5 var))) + (value (nth 4 var)) (status (nth 5 var)) + (has-more (nth 6 var))) (put-text-property 0 (length expr) 'face font-lock-variable-name-face expr) (put-text-property @@ -559,9 +560,10 @@ required by the caller." (setq depth (1+ depth) start (1+ (match-beginning 0)))) (if (eq depth 0) (setq parent nil)) - (if (or (equal (nth 2 var) "0") - (and (equal (nth 2 var) "1") - (string-match "char \\*$" type))) + (if (and (or (not has-more) (string-equal has-more "0")) + (or (equal (nth 2 var) "0") + (and (equal (nth 2 var) "1") + (string-match "char \\*$" type)) )) (speedbar-make-tag-line 'bracket ?? nil nil (concat expr "\t" value) -- 2.39.2