# HG changeset patch # User Miles Bader # Date 966650275 0 # Node ID d55632c1102b8a6d28171fa6274e48e2307cb93e # Parent ec347dd209e8093217005ae129497381cfbbf17a (gud-basic-call): Temporarily widen gud comint buffer while checking for prompt to delete. Use `forward-line 0' instead of beginning-of-line. (gud-filter): Temporarily widen gud comint buffer while examining output. diff -r ec347dd209e8 -r d55632c1102b lisp/gud.el --- a/lisp/gud.el Sat Aug 19 01:55:40 2000 +0000 +++ b/lisp/gud.el Sat Aug 19 01:57:55 2000 +0000 @@ -2184,20 +2184,23 @@ (with-current-buffer (process-buffer proc) ;; If we have been so requested, delete the debugger prompt. - (if (marker-buffer gud-delete-prompt-marker) - (progn - (delete-region (process-mark proc) gud-delete-prompt-marker) - (set-marker gud-delete-prompt-marker nil))) - ;; Save the process output, checking for source file markers. - (setq output (gud-marker-filter string)) - ;; Check for a filename-and-line number. - ;; Don't display the specified file - ;; unless (1) point is at or after the position where output appears - ;; and (2) this buffer is on the screen. - (setq process-window - (and gud-last-frame - (>= (point) (process-mark proc)) - (get-buffer-window (current-buffer)))) + (save-restriction + (widen) + (if (marker-buffer gud-delete-prompt-marker) + (progn + (delete-region (process-mark proc) + gud-delete-prompt-marker) + (set-marker gud-delete-prompt-marker nil))) + ;; Save the process output, checking for source file markers. + (setq output (gud-marker-filter string)) + ;; Check for a filename-and-line number. + ;; Don't display the specified file + ;; unless (1) point is at or after the position where output appears + ;; and (2) this buffer is on the screen. + (setq process-window + (and gud-last-frame + (>= (point) (process-mark proc)) + (get-buffer-window (current-buffer))))) ;; Let the comint filter do the actual insertion. ;; That lets us inherit various comint features. @@ -2382,10 +2385,12 @@ ;; Arrange for the current prompt to get deleted. (save-excursion (set-buffer gud-comint-buffer) - (goto-char (process-mark proc)) - (beginning-of-line) - (if (looking-at comint-prompt-regexp) - (set-marker gud-delete-prompt-marker (point)))) + (save-restriction + (widen) + (goto-char (process-mark proc)) + (forward-line 0) + (if (looking-at comint-prompt-regexp) + (set-marker gud-delete-prompt-marker (point))))) (process-send-string proc command))) (defun gud-refresh (&optional arg)