Mercurial > emacs
changeset 67097:9af04bbaf1e0
(gud-speedbar-menu-items): Add gdb-speedbar-auto-raise as radio button.
(gud-speedbar-buttons): Raise speedbar if requested.
Don't match on "char **...".
(gud-speedbar-buttons): Add (pointer) value for non-leaves.
Make it editable.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Thu, 24 Nov 2005 00:36:03 +0000 |
parents | ca31f8486563 |
children | 8eabc94541ad |
files | lisp/progmodes/gud.el |
diffstat | 1 files changed, 22 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/gud.el Thu Nov 24 00:34:59 2005 +0000 +++ b/lisp/progmodes/gud.el Thu Nov 24 00:36:03 2005 +0000 @@ -52,6 +52,7 @@ (defvar gdb-show-changed-values) (defvar gdb-var-changed) (defvar gdb-var-list) +(defvar gdb-speedbar-auto-raise) (defvar tool-bar-map) ;; ====================================================================== @@ -410,6 +411,10 @@ (memq gud-minor-mode '(gdbmi gdba)))] ["Delete expression" gdb-var-delete (with-current-buffer gud-comint-buffer + (memq gud-minor-mode '(gdbmi gdba)))] + ["Auto raise frame" gdb-speedbar-auto-raise + :style toggle :selected gdb-speedbar-auto-raise + :visible (with-current-buffer gud-comint-buffer (memq gud-minor-mode '(gdbmi gdba)))]) "Additional menu items to add to the speedbar frame.") @@ -444,6 +449,8 @@ (looking-at "Watch Expressions:"))))) (erase-buffer) (insert "Watch Expressions:\n") + (if gdb-speedbar-auto-raise + (raise-frame speedbar-frame)) (let ((var-list gdb-var-list)) (while var-list (let* ((depth 0) (start 0) (char ?+) @@ -453,7 +460,7 @@ start (1+ (match-beginning 0)))) (if (or (equal (nth 2 var) "0") (and (equal (nth 2 var) "1") - (string-match "char \\*" (nth 3 var)))) + (string-match "char \\*$" (nth 3 var)))) (speedbar-make-tag-line 'bracket ?? nil nil (concat (car var) "\t" (nth 4 var)) 'gdb-edit-value @@ -465,10 +472,21 @@ (if (and (cadr var-list) (string-match varnum (cadr (cadr var-list)))) (setq char ?-)) + (if (string-match "\\*$" (nth 3 var)) + (speedbar-make-tag-line 'bracket char + 'gdb-speedbar-expand-node varnum + (concat (car var) "\t" + (nth 3 var)"\t" + (nth 4 var)) + 'gdb-edit-value nil + (if (and (nth 5 var) + gdb-show-changed-values) + 'font-lock-warning-face + nil) depth) (speedbar-make-tag-line 'bracket char 'gdb-speedbar-expand-node varnum (concat (car var) "\t" (nth 3 var)) - nil nil nil depth))) + nil nil nil depth)))) (setq var-list (cdr var-list)))) (setq gdb-var-changed nil))) (t (if (and (save-excursion @@ -3079,6 +3097,8 @@ ("\\$\\(\\w+\\)" (1 font-lock-variable-name-face)) ("^\\s-*\\([a-z]+\\)" (1 font-lock-keyword-face)))) +;; FIXME: The keyword "end" associated with "document" +;; should have font-lock-keyword-face (currently font-lock-doc-face). (defvar gdb-script-font-lock-syntactic-keywords '(("^document\\s-.*\\(\n\\)" (1 "< b")) ;; It would be best to change the \n in front, but it's more difficult.