changeset 15185:44305fd68269

(gud-filter): Move the call to gud-display-frame outside of the save-excursion.
author Richard M. Stallman <rms@gnu.org>
date Wed, 08 May 1996 04:36:21 +0000
parents 43360e066486
children 242bddc25e5a
files lisp/gud.el
diffstat 1 files changed, 26 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gud.el	Wed May 08 02:38:37 1996 +0000
+++ b/lisp/gud.el	Wed May 08 04:36:21 1996 +0000
@@ -1225,15 +1225,16 @@
 	    ;; save it for later.
 	    (setq gud-filter-pending-text
 		  (concat (or gud-filter-pending-text "") string))
-	  (save-excursion
-	    ;; If we have to ask a question during the processing,
-	    ;; defer any additional text that comes from the debugger
-	    ;; during that time.
-	    (let ((gud-filter-defer-flag t))
-	      ;; Process now any text we previously saved up.
-	      (if gud-filter-pending-text
-		  (setq string (concat gud-filter-pending-text string)
-			gud-filter-pending-text nil))
+
+	  ;; If we have to ask a question during the processing,
+	  ;; defer any additional text that comes from the debugger
+	  ;; during that time.
+	  (let ((gud-filter-defer-flag t))
+	    ;; Process now any text we previously saved up.
+	    (if gud-filter-pending-text
+		(setq string (concat gud-filter-pending-text string)
+		      gud-filter-pending-text nil))
+	    (save-excursion
 	      (set-buffer (process-buffer proc))
 	      ;; If we have been so requested, delete the debugger prompt.
 	      (if (marker-buffer gud-delete-prompt-marker)
@@ -1249,20 +1250,24 @@
 	      (setq process-window
 		    (and gud-last-frame
 			 (>= (point) (process-mark proc))
-			 (get-buffer-window (current-buffer)))))
-	    (if process-window
-		(save-selected-window
-		  (select-window process-window)
-		  (gud-display-frame)))
+			 (get-buffer-window (current-buffer))))
+
+	      ;; Let the comint filter do the actual insertion.
+	      ;; That lets us inherit various comint features.
+	      (comint-output-filter proc output)))
 
-	    ;; Let the comint filter do the actual insertion.
-	    ;; That lets us inherit various comint features.
-	    (comint-output-filter proc output)
+	  ;; Put the arrow on the source line.
+	  :; This must be outside of the save-excursion
+	  ;; in case the source file is our current buffer.
+	  (if process-window
+	      (save-selected-window
+		(select-window process-window)
+		(gud-display-frame)))
 
-	    ;; If we deferred text that arrived during this processing,
-	    ;; handle it now.
-	    (if gud-filter-pending-text
-		(gud-filter proc "")))))))
+	  ;; If we deferred text that arrived during this processing,
+	  ;; handle it now.
+	  (if gud-filter-pending-text
+	      (gud-filter proc ""))))))
 
 (defun gud-sentinel (proc msg)
   (cond ((null (buffer-name (process-buffer proc)))
@@ -1325,11 +1330,7 @@
 	    (gud-find-file true-file)))
 	 (window (display-buffer buffer))
 	 (pos))
-;;;    (if (equal buffer (current-buffer))
-;;;	nil
-;;;      (setq buffer-read-only nil))
     (save-excursion
-;;;      (setq buffer-read-only t)
       (set-buffer buffer)
       (save-restriction
 	(widen)