diff options
| author | Nick Roberts | 2005-10-06 03:42:24 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-10-06 03:42:24 +0000 |
| commit | 6a8a087a3c6b40e263d5268eb4da26d902291f11 (patch) | |
| tree | f563104a27a904566d4c1621cb0c533dad8f6791 | |
| parent | cf85afc95b92917108c63eeb309993e031002cc5 (diff) | |
| download | emacs-6a8a087a3c6b40e263d5268eb4da26d902291f11.tar.gz emacs-6a8a087a3c6b40e263d5268eb4da26d902291f11.zip | |
(gdb-fringe-width): New variable.
(gdb-ann3): Set it.
(gdb-put-breakpoint-icon): Don't take fringe-width from speedbar
frame.
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index c8d99dbe3e2..d514580c051 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -103,6 +103,7 @@ and #define directives otherwise.") | |||
| 103 | (defvar gdb-error "Non-nil when GDB is reporting an error.") | 103 | (defvar gdb-error "Non-nil when GDB is reporting an error.") |
| 104 | (defvar gdb-macro-info nil | 104 | (defvar gdb-macro-info nil |
| 105 | "Non-nil if GDB knows that the inferior includes preprocessor macro info.") | 105 | "Non-nil if GDB knows that the inferior includes preprocessor macro info.") |
| 106 | (defvar gdb-fringe-width nil) | ||
| 106 | 107 | ||
| 107 | (defvar gdb-buffer-type nil | 108 | (defvar gdb-buffer-type nil |
| 108 | "One of the symbols bound in `gdb-buffer-rules'.") | 109 | "One of the symbols bound in `gdb-buffer-rules'.") |
| @@ -377,7 +378,8 @@ Also display the main routine in the disassembly buffer if present." | |||
| 377 | gdb-location-alist nil | 378 | gdb-location-alist nil |
| 378 | gdb-find-file-unhook nil | 379 | gdb-find-file-unhook nil |
| 379 | gdb-error nil | 380 | gdb-error nil |
| 380 | gdb-macro-info nil) | 381 | gdb-macro-info nil |
| 382 | gdb-buffer-fringe-width (car (window-fringes))) | ||
| 381 | ;; | 383 | ;; |
| 382 | (setq gdb-buffer-type 'gdba) | 384 | (setq gdb-buffer-type 'gdba) |
| 383 | ;; | 385 | ;; |
| @@ -2470,7 +2472,8 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2470 | (defun gdb-put-breakpoint-icon (enabled bptno) | 2472 | (defun gdb-put-breakpoint-icon (enabled bptno) |
| 2471 | (let ((start (- (line-beginning-position) 1)) | 2473 | (let ((start (- (line-beginning-position) 1)) |
| 2472 | (end (+ (line-end-position) 1)) | 2474 | (end (+ (line-end-position) 1)) |
| 2473 | (putstring (if enabled "B" "b"))) | 2475 | (putstring (if enabled "B" "b")) |
| 2476 | (source-window (get-buffer-window (current-buffer) 0))) | ||
| 2474 | (add-text-properties | 2477 | (add-text-properties |
| 2475 | 0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt") | 2478 | 0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt") |
| 2476 | putstring) | 2479 | putstring) |
| @@ -2480,7 +2483,9 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2480 | 0 1 `(gdb-bptno ,bptno gdb-enabled nil) putstring)) | 2483 | 0 1 `(gdb-bptno ,bptno gdb-enabled nil) putstring)) |
| 2481 | (gdb-remove-breakpoint-icons start end) | 2484 | (gdb-remove-breakpoint-icons start end) |
| 2482 | (if (display-images-p) | 2485 | (if (display-images-p) |
| 2483 | (if (>= (car (window-fringes)) 8) | 2486 | (if (>= (or left-fringe-width |
| 2487 | (if source-window (car (window-fringes source-window))) | ||
| 2488 | gdb-buffer-fringe-width) 8) | ||
| 2484 | (gdb-put-string | 2489 | (gdb-put-string |
| 2485 | nil (1+ start) | 2490 | nil (1+ start) |
| 2486 | `(left-fringe breakpoint | 2491 | `(left-fringe breakpoint |
| @@ -2490,9 +2495,9 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2490 | (when (< left-margin-width 2) | 2495 | (when (< left-margin-width 2) |
| 2491 | (save-current-buffer | 2496 | (save-current-buffer |
| 2492 | (setq left-margin-width 2) | 2497 | (setq left-margin-width 2) |
| 2493 | (if (get-buffer-window (current-buffer) 0) | 2498 | (if source-window |
| 2494 | (set-window-margins | 2499 | (set-window-margins |
| 2495 | (get-buffer-window (current-buffer) 0) | 2500 | source-window |
| 2496 | left-margin-width right-margin-width)))) | 2501 | left-margin-width right-margin-width)))) |
| 2497 | (put-image | 2502 | (put-image |
| 2498 | (if enabled | 2503 | (if enabled |