aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorKaroly Lorentey2006-03-22 15:16:06 +0000
committerKaroly Lorentey2006-03-22 15:16:06 +0000
commitd4717700cc0b7af6197c19e22bd912e3b1ed67ee (patch)
tree4e2a630584b23f670aff57a512a8f2d8182e39c4 /lisp/progmodes
parentf1be5774242454844bf21fbf32e0f6541e2add34 (diff)
parentd63cd76657e12b92a5d7736a15bc9b97a7f9990e (diff)
downloademacs-d4717700cc0b7af6197c19e22bd912e3b1ed67ee.tar.gz
emacs-d4717700cc0b7af6197c19e22bd912e3b1ed67ee.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-160 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-161 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-162 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-163 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-164 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-165 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-166 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-167 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-168 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-169 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-170 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-171 Update from CVS: man/mh-e.texi (Folders): Various edits. * emacs@sv.gnu.org/emacs--devo--0--patch-172 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-58 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-59 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-60 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-61 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-62 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-63 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-64 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-534
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/gdb-ui.el98
-rw-r--r--lisp/progmodes/grep.el7
-rw-r--r--lisp/progmodes/gud.el39
3 files changed, 95 insertions, 49 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index db704985f2a..5b657b1555b 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -4,7 +4,7 @@
4;; Maintainer: FSF 4;; Maintainer: FSF
5;; Keywords: unix, tools 5;; Keywords: unix, tools
6 6
7;; Copyright (C) 2002, 2003, 2004, 2005, 2006 7;; Copyright (C) 2002, 2003, 2004, 2005, 2006
8;; Free Software Foundation, Inc. 8;; Free Software Foundation, Inc.
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -125,6 +125,7 @@ and #define directives otherwise.")
125(defvar gdb-buffer-fringe-width nil) 125(defvar gdb-buffer-fringe-width nil)
126(defvar gdb-signalled nil) 126(defvar gdb-signalled nil)
127(defvar gdb-source-window nil) 127(defvar gdb-source-window nil)
128(defvar gdb-inferior-status nil)
128 129
129(defvar gdb-buffer-type nil 130(defvar gdb-buffer-type nil
130 "One of the symbols bound in `gdb-buffer-rules'.") 131 "One of the symbols bound in `gdb-buffer-rules'.")
@@ -317,6 +318,16 @@ of the inferior. Non-nil means display the layout shown for
317 :group 'gud 318 :group 'gud
318 :version "22.1") 319 :version "22.1")
319 320
321(defun gdb-force-mode-line-update (status)
322 (let ((buffer gud-comint-buffer))
323 (if (and buffer (buffer-name buffer))
324 (with-current-buffer buffer
325 (setq mode-line-process
326 (format ":%s [%s]"
327 (process-status (get-buffer-process buffer)) status))
328 ;; Force mode line redisplay soon.
329 (force-mode-line-update)))))
330
320(defun gdb-many-windows (arg) 331(defun gdb-many-windows (arg)
321 "Toggle the number of windows in the basic arrangement. 332 "Toggle the number of windows in the basic arrangement.
322With arg, display additional buffers iff arg is positive." 333With arg, display additional buffers iff arg is positive."
@@ -524,7 +535,9 @@ With arg, use separate IO iff arg is positive."
524 gdb-buffer-fringe-width (car (window-fringes)) 535 gdb-buffer-fringe-width (car (window-fringes))
525 gdb-debug-ring nil 536 gdb-debug-ring nil
526 gdb-signalled nil 537 gdb-signalled nil
527 gdb-source-window nil) 538 gdb-source-window nil
539 gdb-inferior-status nil
540 gdb-continuation nil)
528 541
529 (setq gdb-buffer-type 'gdba) 542 (setq gdb-buffer-type 'gdba)
530 543
@@ -670,7 +683,8 @@ With arg, enter name of variable to be watched in the minibuffer."
670 (require 'tooltip) 683 (require 'tooltip)
671 (save-selected-window 684 (save-selected-window
672 (let ((expr (if arg 685 (let ((expr (if arg
673 (read-string "Name of variable: ") 686 (completing-read "Name of variable: "
687 'gud-gdb-complete-command)
674 (tooltip-identifier-from-point (point))))) 688 (tooltip-identifier-from-point (point)))))
675 (catch 'already-watched 689 (catch 'already-watched
676 (dolist (var gdb-var-list) 690 (dolist (var gdb-var-list)
@@ -1064,6 +1078,7 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'."
1064;; 1078;;
1065;; These lists are consumed tail first. 1079;; These lists are consumed tail first.
1066;; 1080;;
1081(defvar gdb-continuation nil)
1067 1082
1068(defun gdb-send (proc string) 1083(defun gdb-send (proc string)
1069 "A comint send filter for gdb. 1084 "A comint send filter for gdb.
@@ -1071,12 +1086,15 @@ This filter may simply queue input for a later time."
1071 (with-current-buffer gud-comint-buffer 1086 (with-current-buffer gud-comint-buffer
1072 (let ((inhibit-read-only t)) 1087 (let ((inhibit-read-only t))
1073 (remove-text-properties (point-min) (point-max) '(face)))) 1088 (remove-text-properties (point-min) (point-max) '(face))))
1074 (let ((item (concat string "\n"))) 1089 (if (string-match "\\\\$" string)
1075 (if gud-running 1090 (setq gdb-continuation (concat gdb-continuation string "\n"))
1076 (progn 1091 (let ((item (concat gdb-continuation string "\n")))
1077 (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring)) 1092 (if gud-running
1078 (process-send-string proc item)) 1093 (progn
1079 (gdb-enqueue-input item)))) 1094 (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring))
1095 (process-send-string proc item))
1096 (gdb-enqueue-input item)))
1097 (setq gdb-continuation nil)))
1080 1098
1081;; Note: Stuff enqueued here will be sent to the next prompt, even if it 1099;; Note: Stuff enqueued here will be sent to the next prompt, even if it
1082;; is a query, or other non-top-level prompt. 1100;; is a query, or other non-top-level prompt.
@@ -1152,7 +1170,7 @@ This filter may simply queue input for a later time."
1152 ("starting" gdb-starting) 1170 ("starting" gdb-starting)
1153 ("exited" gdb-exited) 1171 ("exited" gdb-exited)
1154 ("signalled" gdb-signalled) 1172 ("signalled" gdb-signalled)
1155 ("signal" gdb-stopping) 1173 ("signal" gdb-signal)
1156 ("breakpoint" gdb-stopping) 1174 ("breakpoint" gdb-stopping)
1157 ("watchpoint" gdb-stopping) 1175 ("watchpoint" gdb-stopping)
1158 ("frame-begin" gdb-frame-begin) 1176 ("frame-begin" gdb-frame-begin)
@@ -1164,6 +1182,7 @@ This filter may simply queue input for a later time."
1164(defun gdb-resync() 1182(defun gdb-resync()
1165 (setq gdb-flush-pending-output t) 1183 (setq gdb-flush-pending-output t)
1166 (setq gud-running nil) 1184 (setq gud-running nil)
1185 (gdb-force-mode-line-update "stopped")
1167 (setq gdb-output-sink 'user) 1186 (setq gdb-output-sink 'user)
1168 (setq gdb-input-queue nil) 1187 (setq gdb-input-queue nil)
1169 (setq gdb-pending-triggers nil) 1188 (setq gdb-pending-triggers nil)
@@ -1238,6 +1257,8 @@ not GDB."
1238 ((eq sink 'user) 1257 ((eq sink 'user)
1239 (progn 1258 (progn
1240 (setq gud-running t) 1259 (setq gud-running t)
1260 (setq gdb-inferior-status "running")
1261 (gdb-force-mode-line-update gdb-inferior-status)
1241 (gdb-remove-text-properties) 1262 (gdb-remove-text-properties)
1242 (setq gud-overlay-arrow-position nil) 1263 (setq gud-overlay-arrow-position nil)
1243 (setq gdb-overlay-arrow-position nil) 1264 (setq gdb-overlay-arrow-position nil)
@@ -1247,6 +1268,11 @@ not GDB."
1247 (gdb-resync) 1268 (gdb-resync)
1248 (error "Unexpected `starting' annotation"))))) 1269 (error "Unexpected `starting' annotation")))))
1249 1270
1271(defun gdb-signal (ignored)
1272 (setq gdb-inferior-status "signal")
1273 (gdb-force-mode-line-update gdb-inferior-status)
1274 (gdb-stopping ignored))
1275
1250(defun gdb-stopping (ignored) 1276(defun gdb-stopping (ignored)
1251 "An annotation handler for `breakpoint' and other annotations. 1277 "An annotation handler for `breakpoint' and other annotations.
1252They say that I/O for the subprocess is now GDB, not the program 1278They say that I/O for the subprocess is now GDB, not the program
@@ -1269,6 +1295,8 @@ directives."
1269 (setq gdb-active-process nil) 1295 (setq gdb-active-process nil)
1270 (setq gud-overlay-arrow-position nil) 1296 (setq gud-overlay-arrow-position nil)
1271 (setq gdb-overlay-arrow-position nil) 1297 (setq gdb-overlay-arrow-position nil)
1298 (setq gdb-inferior-status "exited")
1299 (gdb-force-mode-line-update gdb-inferior-status)
1272 (gdb-stopping ignored)) 1300 (gdb-stopping ignored))
1273 1301
1274(defun gdb-signalled (ignored) 1302(defun gdb-signalled (ignored)
@@ -1290,6 +1318,11 @@ directives."
1290It is just like `gdb-stopping', except that if we already set the output 1318It is just like `gdb-stopping', except that if we already set the output
1291sink to `user' in `gdb-stopping', that is fine." 1319sink to `user' in `gdb-stopping', that is fine."
1292 (setq gud-running nil) 1320 (setq gud-running nil)
1321 (unless (or gud-overlay-arrow-position gud-last-frame)
1322 (gud-display-line (car gud-last-last-frame) (cdr gud-last-last-frame)))
1323 (unless (member gdb-inferior-status '("exited" "signal"))
1324 (setq gdb-inferior-status "stopped")
1325 (gdb-force-mode-line-update gdb-inferior-status))
1293 (let ((sink gdb-output-sink)) 1326 (let ((sink gdb-output-sink))
1294 (cond 1327 (cond
1295 ((eq sink 'inferior) 1328 ((eq sink 'inferior)
@@ -1628,10 +1661,13 @@ static char *magick[] = {
1628(defvar breakpoint-disabled-icon nil 1661(defvar breakpoint-disabled-icon nil
1629 "Icon for disabled breakpoint in display margin.") 1662 "Icon for disabled breakpoint in display margin.")
1630 1663
1631;; Bitmap for breakpoint in fringe
1632(and (display-images-p) 1664(and (display-images-p)
1665 ;; Bitmap for breakpoint in fringe
1633 (define-fringe-bitmap 'breakpoint 1666 (define-fringe-bitmap 'breakpoint
1634 "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")) 1667 "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")
1668 ;; Bitmap for gud-overlay-arrow in fringe
1669 (define-fringe-bitmap 'hollow-right-triangle
1670 "\xe0\x90\x88\x84\x84\x88\x90\xe0"))
1635 1671
1636(defface breakpoint-enabled 1672(defface breakpoint-enabled
1637 '((t 1673 '((t
@@ -1887,11 +1923,11 @@ static char *magick[] = {
1887 1923
1888(def-gdb-auto-updated-buffer gdb-stack-buffer 1924(def-gdb-auto-updated-buffer gdb-stack-buffer
1889 gdb-invalidate-frames 1925 gdb-invalidate-frames
1890 "server where\n" 1926 "server info stack\n"
1891 gdb-info-frames-handler 1927 gdb-info-stack-handler
1892 gdb-info-frames-custom) 1928 gdb-info-stack-custom)
1893 1929
1894(defun gdb-info-frames-custom () 1930(defun gdb-info-stack-custom ()
1895 (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer) 1931 (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)
1896 (save-excursion 1932 (save-excursion
1897 (let ((buffer-read-only nil) 1933 (let ((buffer-read-only nil)
@@ -1952,7 +1988,7 @@ static char *magick[] = {
1952 map)) 1988 map))
1953 1989
1954(defun gdb-frames-mode () 1990(defun gdb-frames-mode ()
1955 "Major mode for gdb frames. 1991 "Major mode for gdb call stack.
1956 1992
1957\\{gdb-frames-mode-map}" 1993\\{gdb-frames-mode-map}"
1958 (kill-all-local-variables) 1994 (kill-all-local-variables)
@@ -2033,15 +2069,13 @@ static char *magick[] = {
2033 map)) 2069 map))
2034 2070
2035(defvar gdb-threads-font-lock-keywords 2071(defvar gdb-threads-font-lock-keywords
2036 '( 2072 '((") +\\([^ ]+\\) (" (1 font-lock-function-name-face))
2037 (") +\\([^ ]+\\) (" (1 font-lock-function-name-face))
2038 ("in \\([^ ]+\\) (" (1 font-lock-function-name-face)) 2073 ("in \\([^ ]+\\) (" (1 font-lock-function-name-face))
2039 ("\\(\\(\\sw\\|[_.]\\)+\\)=" (1 font-lock-variable-name-face)) 2074 ("\\(\\(\\sw\\|[_.]\\)+\\)=" (1 font-lock-variable-name-face)))
2040 )
2041 "Font lock keywords used in `gdb-threads-mode'.") 2075 "Font lock keywords used in `gdb-threads-mode'.")
2042 2076
2043(defun gdb-threads-mode () 2077(defun gdb-threads-mode ()
2044 "Major mode for gdb frames. 2078 "Major mode for gdb threads.
2045 2079
2046\\{gdb-threads-mode-map}" 2080\\{gdb-threads-mode-map}"
2047 (kill-all-local-variables) 2081 (kill-all-local-variables)
@@ -2101,7 +2135,7 @@ static char *magick[] = {
2101 (unless (string-equal (match-string 0) "The") 2135 (unless (string-equal (match-string 0) "The")
2102 (put-text-property start (match-end 0) 2136 (put-text-property start (match-end 0)
2103 'face font-lock-variable-name-face) 2137 'face font-lock-variable-name-face)
2104 (add-text-properties start end 2138 (add-text-properties start end
2105 '(help-echo "mouse-2: edit value" 2139 '(help-echo "mouse-2: edit value"
2106 mouse-face highlight)))) 2140 mouse-face highlight))))
2107 (forward-line 1)))))) 2141 (forward-line 1))))))
@@ -2754,6 +2788,7 @@ Kills the gdb buffers, and resets variables and the source buffers."
2754 (setq gdb-overlay-arrow-position nil)) 2788 (setq gdb-overlay-arrow-position nil))
2755 (setq overlay-arrow-variable-list 2789 (setq overlay-arrow-variable-list
2756 (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list)) 2790 (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list))
2791 (setq fringe-indicator-alist '((overlay-arrow . right-triangle)))
2757 (if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) 2792 (if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
2758 (speedbar-refresh)) 2793 (speedbar-refresh))
2759 (setq gud-running nil) 2794 (setq gud-running nil)
@@ -3079,6 +3114,17 @@ BUFFER nil or omitted means use the current buffer."
3079 (goto-char (point-min)) 3114 (goto-char (point-min))
3080 (if (re-search-forward "Stack level \\([0-9]+\\)" nil t) 3115 (if (re-search-forward "Stack level \\([0-9]+\\)" nil t)
3081 (setq gdb-frame-number (match-string 1))) 3116 (setq gdb-frame-number (match-string 1)))
3117 (if gud-overlay-arrow-position
3118 (let ((buffer (marker-buffer gud-overlay-arrow-position))
3119 (position (marker-position gud-overlay-arrow-position)))
3120 (when buffer
3121 (with-current-buffer buffer
3122 (setq fringe-indicator-alist
3123 (if (string-equal gdb-frame-number "0")
3124 nil
3125 '((overlay-arrow . hollow-right-triangle))))
3126 (setq gud-overlay-arrow-position (make-marker))
3127 (set-marker gud-overlay-arrow-position position)))))
3082 (goto-char (point-min)) 3128 (goto-char (point-min))
3083 (if (re-search-forward 3129 (if (re-search-forward
3084 ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? " nil t) 3130 ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? " nil t)
@@ -3123,7 +3169,7 @@ is set in them."
3123 (gdb-enqueue-input 3169 (gdb-enqueue-input
3124 (list 3170 (list
3125 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) 3171 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
3126 (concat "server interpreter mi \"-var-list-children --all-values " 3172 (concat "server interpreter mi \"-var-list-children --all-values "
3127 varnum "\"\n") 3173 varnum "\"\n")
3128 (concat "-var-list-children --all-values " varnum "\n")) 3174 (concat "-var-list-children --all-values " varnum "\n"))
3129 `(lambda () (gdb-var-list-children-handler-1 ,varnum))))) 3175 `(lambda () (gdb-var-list-children-handler-1 ,varnum)))))
@@ -3252,7 +3298,7 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}")
3252 (unless (string-equal (match-string 0) "No registers.") 3298 (unless (string-equal (match-string 0) "No registers.")
3253 (put-text-property start (match-end 0) 3299 (put-text-property start (match-end 0)
3254 'face font-lock-variable-name-face) 3300 'face font-lock-variable-name-face)
3255 (add-text-properties start end 3301 (add-text-properties start end
3256 '(help-echo "mouse-2: edit value" 3302 '(help-echo "mouse-2: edit value"
3257 mouse-face highlight)))) 3303 mouse-face highlight))))
3258 (forward-line 1)))))) 3304 (forward-line 1))))))
@@ -3334,7 +3380,7 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}")
3334 help-echo "mouse-2: create watch expression" 3380 help-echo "mouse-2: create watch expression"
3335 local-map ,gdb-locals-watch-map-1) 3381 local-map ,gdb-locals-watch-map-1)
3336 name)) 3382 name))
3337 (insert 3383 (insert
3338 (concat name "\t" (nth 1 local) 3384 (concat name "\t" (nth 1 local)
3339 "\t" (nth 2 local) "\n"))) 3385 "\t" (nth 2 local) "\n")))
3340 (set-window-start window start) 3386 (set-window-start window start)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 0e151ce9be2..6afa3f29348 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -33,8 +33,6 @@
33 33
34(require 'compile) 34(require 'compile)
35 35
36(defvar font-lock-lines-before)
37
38 36
39(defgroup grep nil 37(defgroup grep nil
40 "Run compiler as inferior of Emacs, parse error messages." 38 "Run compiler as inferior of Emacs, parse error messages."
@@ -536,10 +534,7 @@ temporarily highlight in visited source lines."
536 grep-regexp-alist) 534 grep-regexp-alist)
537 (set (make-local-variable 'compilation-process-setup-function) 535 (set (make-local-variable 'compilation-process-setup-function)
538 'grep-process-setup) 536 'grep-process-setup)
539 (set (make-local-variable 'compilation-disable-input) t) 537 (set (make-local-variable 'compilation-disable-input) t))
540 ;; Set `font-lock-lines-before' to 0 to not refontify the previous
541 ;; line where grep markers may be already removed.
542 (set (make-local-variable 'font-lock-lines-before) 0))
543 538
544;;;###autoload 539;;;###autoload
545(defun grep-find (command-args) 540(defun grep-find (command-args)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index f98ee3540d8..7fa5a0b6dcc 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -740,14 +740,18 @@ To run GDB in text command mode, set `gud-gdb-command-name' to
740 740
741(defvar gud-comint-buffer nil) 741(defvar gud-comint-buffer nil)
742 742
743(defun gud-gdb-complete-command () 743(defun gud-gdb-complete-command (&optional command a b)
744 "Perform completion on the GDB command preceding point. 744 "Perform completion on the GDB command preceding point.
745This is implemented using the GDB `complete' command which isn't 745This is implemented using the GDB `complete' command which isn't
746available with older versions of GDB." 746available with older versions of GDB."
747 (interactive) 747 (interactive)
748 (let* ((end (point)) 748 (if command
749 (command (buffer-substring (comint-line-beginning-position) end)) 749 ;; Used by gud-watch in mini-buffer.
750 (command-word 750 (setq command (concat "p " command))
751 ;; Used in GUD buffer.
752 (let ((end (point)))
753 (setq command (buffer-substring (comint-line-beginning-position) end))))
754 (let* ((command-word
751 ;; Find the word break. This match will always succeed. 755 ;; Find the word break. This match will always succeed.
752 (and (string-match "\\(\\`\\| \\)\\([^ ]*\\)\\'" command) 756 (and (string-match "\\(\\`\\| \\)\\([^ ]*\\)\\'" command)
753 (substring command (match-beginning 2)))) 757 (substring command (match-beginning 2))))
@@ -866,13 +870,14 @@ It is passed through FILTER before we look at it."
866 870
867(defun gud-gdb-run-command-fetch-lines (command buffer &optional skip) 871(defun gud-gdb-run-command-fetch-lines (command buffer &optional skip)
868 "Run COMMAND, and return the list of lines it outputs. 872 "Run COMMAND, and return the list of lines it outputs.
869BUFFER is the GUD buffer in which to run the command. 873BUFFER is the current buffer which may be the GUD buffer in which to run.
870SKIP is the number of chars to skip on each lines, it defaults to 0." 874SKIP is the number of chars to skip on each lines, it defaults to 0."
871 (with-current-buffer buffer 875 (with-current-buffer gud-comint-buffer
872 (if (save-excursion 876 (if (and (eq gud-comint-buffer buffer)
873 (goto-char (point-max)) 877 (save-excursion
874 (forward-line 0) 878 (goto-char (point-max))
875 (not (looking-at comint-prompt-regexp))) 879 (forward-line 0)
880 (not (looking-at comint-prompt-regexp))))
876 nil 881 nil
877 ;; Much of this copied from GDB complete, but I'm grabbing the stack 882 ;; Much of this copied from GDB complete, but I'm grabbing the stack
878 ;; frame instead. 883 ;; frame instead.
@@ -881,12 +886,13 @@ SKIP is the number of chars to skip on each lines, it defaults to 0."
881 (gud-gdb-fetch-lines-string nil) 886 (gud-gdb-fetch-lines-string nil)
882 (gud-gdb-fetch-lines-break (or skip 0)) 887 (gud-gdb-fetch-lines-break (or skip 0))
883 (gud-marker-filter 888 (gud-marker-filter
884 `(lambda (string) (gud-gdb-fetch-lines-filter string ',gud-marker-filter)))) 889 `(lambda (string)
890 (gud-gdb-fetch-lines-filter string ',gud-marker-filter))))
885 ;; Issue the command to GDB. 891 ;; Issue the command to GDB.
886 (gud-basic-call command) 892 (gud-basic-call command)
887 ;; Slurp the output. 893 ;; Slurp the output.
888 (while gud-gdb-fetch-lines-in-progress 894 (while gud-gdb-fetch-lines-in-progress
889 (accept-process-output (get-buffer-process buffer))) 895 (accept-process-output (get-buffer-process gud-comint-buffer)))
890 (nreverse gud-gdb-fetched-lines))))) 896 (nreverse gud-gdb-fetched-lines)))))
891 897
892 898
@@ -3270,11 +3276,10 @@ Treats actions as defuns."
3270 (remove-hook 'tooltip-hook 'gud-tooltip-tips) 3276 (remove-hook 'tooltip-hook 'gud-tooltip-tips)
3271 (define-key global-map [mouse-movement] 'ignore))) 3277 (define-key global-map [mouse-movement] 'ignore)))
3272 (gud-tooltip-activate-mouse-motions-if-enabled) 3278 (gud-tooltip-activate-mouse-motions-if-enabled)
3273 (if (and 3279 (if (and gud-comint-buffer
3274 gud-comint-buffer 3280 (buffer-name gud-comint-buffer); gud-comint-buffer might be killed
3275 (buffer-name gud-comint-buffer); gud-comint-buffer might be killed 3281 (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
3276 (with-current-buffer gud-comint-buffer 3282 '(gdbmi gdba)))
3277 (memq gud-minor-mode '(gdbmi gdba))))
3278 (if gud-tooltip-mode 3283 (if gud-tooltip-mode
3279 (progn 3284 (progn
3280 (dolist (buffer (buffer-list)) 3285 (dolist (buffer (buffer-list))