aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1992-09-30 08:29:25 +0000
committerJim Blandy1992-09-30 08:29:25 +0000
commit7739e1b816e4a546584f87b5292c73ea44b27402 (patch)
tree3569deb948c18a92d8dc2d374e50c1eef5f72736
parent41acdfa97af4c90bc06395f9a7dcaae419b711fc (diff)
downloademacs-7739e1b816e4a546584f87b5292c73ea44b27402.tar.gz
emacs-7739e1b816e4a546584f87b5292c73ea44b27402.zip
* gud.el (gud-filter-insert): Previous changes misunderstood
the arrangement of unwind-protect and the save-excursion; restored that structure.
-rw-r--r--lisp/gud.el35
1 files changed, 19 insertions, 16 deletions
diff --git a/lisp/gud.el b/lisp/gud.el
index 943ecdabeea..65008f28e1f 100644
--- a/lisp/gud.el
+++ b/lisp/gud.el
@@ -439,22 +439,25 @@ comint mode, which see."
439 ;; Here's where the actual buffer insertion is done 439 ;; Here's where the actual buffer insertion is done
440 (save-excursion 440 (save-excursion
441 (set-buffer (process-buffer proc)) 441 (set-buffer (process-buffer proc))
442 (let ((output-after-point (< (point) (process-mark proc)))) 442 (let ((moving (= (point) (process-mark proc)))
443 (goto-char (process-mark proc)) 443 (output-after-point (< (point) (process-mark proc))))
444 ;; If we have been so requested, delete the debugger prompt. 444 (save-excursion
445 (if (marker-buffer gud-delete-prompt-marker) 445 (goto-char (process-mark proc))
446 (progn 446 ;; If we have been so requested, delete the debugger prompt.
447 (delete-region (point) gud-delete-prompt-marker) 447 (if (marker-buffer gud-delete-prompt-marker)
448 (set-marker gud-delete-prompt-marker nil))) 448 (progn
449 (insert-before-markers string) 449 (delete-region (point) gud-delete-prompt-marker)
450 ;; Check for a filename-and-line number. 450 (set-marker gud-delete-prompt-marker nil)))
451 ;; Don't display the specified file 451 (insert-before-markers string)
452 ;; unless (1) point is at or after the position where output appears 452 ;; Check for a filename-and-line number.
453 ;; and (2) this buffer is on the screen. 453 ;; Don't display the specified file
454 (if (and gud-last-frame 454 ;; unless (1) point is at or after the position where output appears
455 (not output-after-point) 455 ;; and (2) this buffer is on the screen.
456 (get-buffer-window (current-buffer))) 456 (if (and gud-last-frame
457 (gud-display-frame))))) 457 (not output-after-point)
458 (get-buffer-window (current-buffer)))
459 (gud-display-frame)))
460 (if moving (goto-char (process-mark proc))))))
458 461
459(defun gud-sentinel (proc msg) 462(defun gud-sentinel (proc msg)
460 (cond ((null (buffer-name (process-buffer proc))) 463 (cond ((null (buffer-name (process-buffer proc)))