diff options
| author | Nick Roberts | 2006-02-18 22:57:05 +0000 |
|---|---|---|
| committer | Nick Roberts | 2006-02-18 22:57:05 +0000 |
| commit | 02a471b435072c2e4fc95831cecbe7a3e54bdc4b (patch) | |
| tree | c4b310f21ef97443f453c3a4b2fc9ec4b2480078 | |
| parent | e06b715f25bc9382330886f81bb751373f7e74c8 (diff) | |
| download | emacs-02a471b435072c2e4fc95831cecbe7a3e54bdc4b.tar.gz emacs-02a471b435072c2e4fc95831cecbe7a3e54bdc4b.zip | |
(gud-speedbar-buttons): Update properly for
shadow face. Don't provide binding to edit variable when it is
out of scope.
| -rw-r--r-- | lisp/progmodes/gud.el | 63 |
1 files changed, 36 insertions, 27 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index a5ed1217f94..3b441d0c296 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -453,46 +453,55 @@ required by the caller." | |||
| 453 | (insert "Watch Expressions:\n") | 453 | (insert "Watch Expressions:\n") |
| 454 | (if gdb-speedbar-auto-raise | 454 | (if gdb-speedbar-auto-raise |
| 455 | (raise-frame speedbar-frame)) | 455 | (raise-frame speedbar-frame)) |
| 456 | (let ((var-list gdb-var-list)) | 456 | (let ((var-list gdb-var-list) parent) |
| 457 | (while var-list | 457 | (while var-list |
| 458 | (let* (char (depth 0) (start 0) | 458 | (let* (char (depth 0) (start 0) (var (car var-list)) |
| 459 | (var (car var-list)) (varnum (nth 1 var))) | 459 | (varnum (nth 1 var)) (status (nth 5 var))) |
| 460 | (while (string-match "\\." varnum start) | 460 | (while (string-match "\\." varnum start) |
| 461 | (setq depth (1+ depth) | 461 | (setq depth (1+ depth) |
| 462 | start (1+ (match-beginning 0)))) | 462 | start (1+ (match-beginning 0)))) |
| 463 | (if (eq depth 0) (setq parent nil)) | ||
| 463 | (if (or (equal (nth 2 var) "0") | 464 | (if (or (equal (nth 2 var) "0") |
| 464 | (and (equal (nth 2 var) "1") | 465 | (and (equal (nth 2 var) "1") |
| 465 | (string-match "char \\*$" (nth 3 var)))) | 466 | (string-match "char \\*$" (nth 3 var)))) |
| 466 | (speedbar-make-tag-line 'bracket ?? nil nil | 467 | (speedbar-make-tag-line |
| 467 | (concat (car var) "\t" (nth 4 var)) | 468 | 'bracket ?? nil nil |
| 468 | 'gdb-edit-value | 469 | (concat (car var) "\t" (nth 4 var)) |
| 469 | nil | 470 | (if (or parent (eq status 'out-of-scope)) |
| 470 | (if gdb-show-changed-values | 471 | nil 'gdb-edit-value) |
| 471 | (case (nth 5 var) | 472 | nil |
| 472 | (changed 'font-lock-warning-face) | 473 | (if gdb-show-changed-values |
| 473 | (out-of-scope 'shadow) | 474 | (or parent (case status |
| 474 | (nil nil)) | 475 | (changed 'font-lock-warning-face) |
| 475 | nil) depth) | 476 | (out-of-scope 'shadow) |
| 477 | (nil nil))) | ||
| 478 | nil) depth) | ||
| 479 | (if (eq status 'out-of-scope) (setq parent 'shadow)) | ||
| 476 | (if (and (cadr var-list) | 480 | (if (and (cadr var-list) |
| 477 | (string-match (concat varnum "\\.") | 481 | (string-match (concat varnum "\\.") |
| 478 | (cadr (cadr var-list)))) | 482 | (cadr (cadr var-list)))) |
| 479 | (setq char ?-) | 483 | (setq char ?-) |
| 480 | (setq char ?+)) | 484 | (setq char ?+)) |
| 481 | (if (string-match "\\*$" (nth 3 var)) | 485 | (if (string-match "\\*$" (nth 3 var)) |
| 482 | (speedbar-make-tag-line 'bracket char | 486 | (speedbar-make-tag-line |
| 483 | 'gdb-speedbar-expand-node varnum | 487 | 'bracket char |
| 484 | (concat (car var) "\t" | 488 | 'gdb-speedbar-expand-node varnum |
| 485 | (nth 3 var)"\t" | 489 | (concat (car var) "\t" |
| 486 | (nth 4 var)) | 490 | (nth 3 var)"\t" |
| 487 | 'gdb-edit-value nil | 491 | (nth 4 var)) |
| 488 | (if (and (nth 5 var) | 492 | (if (or parent status 'out-of-scope) |
| 489 | gdb-show-changed-values) | 493 | nil 'gdb-edit-value) |
| 490 | 'font-lock-warning-face | 494 | nil |
| 491 | nil) depth) | 495 | (if (and status gdb-show-changed-values) |
| 492 | (speedbar-make-tag-line 'bracket char | 496 | 'shadow nil) |
| 493 | 'gdb-speedbar-expand-node varnum | 497 | depth) |
| 494 | (concat (car var) "\t" (nth 3 var)) | 498 | (speedbar-make-tag-line |
| 495 | nil nil nil depth)))) | 499 | 'bracket char |
| 500 | 'gdb-speedbar-expand-node varnum | ||
| 501 | (concat (car var) "\t" (nth 3 var)) | ||
| 502 | nil nil | ||
| 503 | (if (and (nth 5 var) gdb-show-changed-values) 'shadow nil) | ||
| 504 | depth)))) | ||
| 496 | (setq var-list (cdr var-list)))) | 505 | (setq var-list (cdr var-list)))) |
| 497 | (setq gdb-var-changed nil))) | 506 | (setq gdb-var-changed nil))) |
| 498 | (t (unless (and (save-excursion | 507 | (t (unless (and (save-excursion |