aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-05-08 04:36:21 +0000
committerRichard M. Stallman1996-05-08 04:36:21 +0000
commitc7856dbefcd0402fddaf412b33e30db8c48d68c2 (patch)
treec4686a642fbf92884c6584feafdad681ef270265
parent1747a1941c1229b41e22ba249ca365dc0ec99d1b (diff)
downloademacs-c7856dbefcd0402fddaf412b33e30db8c48d68c2.tar.gz
emacs-c7856dbefcd0402fddaf412b33e30db8c48d68c2.zip
(gud-filter): Move the call to gud-display-frame
outside of the save-excursion.
-rw-r--r--lisp/gud.el55
1 files changed, 28 insertions, 27 deletions
diff --git a/lisp/gud.el b/lisp/gud.el
index b42d9a20011..d24a6a441da 100644
--- a/lisp/gud.el
+++ b/lisp/gud.el
@@ -1225,15 +1225,16 @@ It is saved for when this flag is not set.")
1225 ;; save it for later. 1225 ;; save it for later.
1226 (setq gud-filter-pending-text 1226 (setq gud-filter-pending-text
1227 (concat (or gud-filter-pending-text "") string)) 1227 (concat (or gud-filter-pending-text "") string))
1228 (save-excursion 1228
1229 ;; If we have to ask a question during the processing, 1229 ;; If we have to ask a question during the processing,
1230 ;; defer any additional text that comes from the debugger 1230 ;; defer any additional text that comes from the debugger
1231 ;; during that time. 1231 ;; during that time.
1232 (let ((gud-filter-defer-flag t)) 1232 (let ((gud-filter-defer-flag t))
1233 ;; Process now any text we previously saved up. 1233 ;; Process now any text we previously saved up.
1234 (if gud-filter-pending-text 1234 (if gud-filter-pending-text
1235 (setq string (concat gud-filter-pending-text string) 1235 (setq string (concat gud-filter-pending-text string)
1236 gud-filter-pending-text nil)) 1236 gud-filter-pending-text nil))
1237 (save-excursion
1237 (set-buffer (process-buffer proc)) 1238 (set-buffer (process-buffer proc))
1238 ;; If we have been so requested, delete the debugger prompt. 1239 ;; If we have been so requested, delete the debugger prompt.
1239 (if (marker-buffer gud-delete-prompt-marker) 1240 (if (marker-buffer gud-delete-prompt-marker)
@@ -1249,20 +1250,24 @@ It is saved for when this flag is not set.")
1249 (setq process-window 1250 (setq process-window
1250 (and gud-last-frame 1251 (and gud-last-frame
1251 (>= (point) (process-mark proc)) 1252 (>= (point) (process-mark proc))
1252 (get-buffer-window (current-buffer))))) 1253 (get-buffer-window (current-buffer))))
1253 (if process-window 1254
1254 (save-selected-window 1255 ;; Let the comint filter do the actual insertion.
1255 (select-window process-window) 1256 ;; That lets us inherit various comint features.
1256 (gud-display-frame))) 1257 (comint-output-filter proc output)))
1257 1258
1258 ;; Let the comint filter do the actual insertion. 1259 ;; Put the arrow on the source line.
1259 ;; That lets us inherit various comint features. 1260 :; This must be outside of the save-excursion
1260 (comint-output-filter proc output) 1261 ;; in case the source file is our current buffer.
1261 1262 (if process-window
1262 ;; If we deferred text that arrived during this processing, 1263 (save-selected-window
1263 ;; handle it now. 1264 (select-window process-window)
1264 (if gud-filter-pending-text 1265 (gud-display-frame)))
1265 (gud-filter proc ""))))))) 1266
1267 ;; If we deferred text that arrived during this processing,
1268 ;; handle it now.
1269 (if gud-filter-pending-text
1270 (gud-filter proc ""))))))
1266 1271
1267(defun gud-sentinel (proc msg) 1272(defun gud-sentinel (proc msg)
1268 (cond ((null (buffer-name (process-buffer proc))) 1273 (cond ((null (buffer-name (process-buffer proc)))
@@ -1325,11 +1330,7 @@ Obeying it means displaying in another window the specified file and line."
1325 (gud-find-file true-file))) 1330 (gud-find-file true-file)))
1326 (window (display-buffer buffer)) 1331 (window (display-buffer buffer))
1327 (pos)) 1332 (pos))
1328;;; (if (equal buffer (current-buffer))
1329;;; nil
1330;;; (setq buffer-read-only nil))
1331 (save-excursion 1333 (save-excursion
1332;;; (setq buffer-read-only t)
1333 (set-buffer buffer) 1334 (set-buffer buffer)
1334 (save-restriction 1335 (save-restriction
1335 (widen) 1336 (widen)