# HG changeset patch # User Nick Roberts # Date 1132140394 0 # Node ID 830bec4c85bbbe86a5cf94b71bbea9f5a3d13ab7 # Parent c045303407bbfbec5f54cb26c8e77b5abdc1fa09 (gud-speedbar-item-info): New function. (gud-install-speedbar-variables): Use it to display data types of watch expression as tooltips in speedbar. diff -r c045303407bb -r 830bec4c85bb lisp/progmodes/gud.el --- a/lisp/progmodes/gud.el Wed Nov 16 11:25:18 2005 +0000 +++ b/lisp/progmodes/gud.el Wed Nov 16 11:26:34 2005 +0000 @@ -371,6 +371,12 @@ (defvar gud-speedbar-key-map nil "Keymap used when in the buffers display 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 4 var) + (speedbar-message "%s" (nth 3 var))))) + (defun gud-install-speedbar-variables () "Install those variables used by speedbar to enhance gud/gdb." (if gud-speedbar-key-map @@ -387,7 +393,12 @@ (speedbar-add-expansion-list '("GUD" gud-speedbar-menu-items gud-speedbar-key-map - gud-expansion-speedbar-buttons))) + gud-expansion-speedbar-buttons)) + + (add-to-list + 'speedbar-mode-functions-list + '("GUD" (speedbar-item-info . gud-speedbar-item-info) + (speedbar-line-directory . ignore)))) (defvar gud-speedbar-menu-items '(["Jump to stack frame" speedbar-edit-line