aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2000-08-19 01:59:21 +0000
committerMiles Bader <[email protected]>2000-08-19 01:59:21 +0000
commit136b4eda878f450163e70dd1ed56980d35d6d742 (patch)
tree58b69a85b7c970dc0317d50d84740102b0753d74 /lisp
parentd8d972bf49a45f00663c94b4457966cb3bf4501b (diff)
(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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog19
-rw-r--r--lisp/gud.el41
2 files changed, 42 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 899a5a5040..93a1e633fb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,22 @@
+2000-08-19 Miles Bader <[email protected]>
+
+ * emacs-lisp/bytecomp.el (byte-compile-beginning-of-line):
+ Compiler macro removed; beginning-of-line is no longer always
+ equivalent to forward-line, in the presence of fields.
+
+ * comint.el (comint-output-filter): Remove ad-hoc saving of
+ restriction, and just use save-restriction, now that it works
+ correctly. Don't adjust comint-last-input-start to account for
+ our insertion; it shouldn't have moved because we don't use
+ insert-before-markers anymore. Comment out call to
+ `force-mode-line-update'; why is it here?
+
+ * gud.el (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.
+
2000-08-18 Stefan Monnier <[email protected]>
* textmodes/ispell.el (ispell-menu-map-needed): Put back the boundp
diff --git a/lisp/gud.el b/lisp/gud.el
index 688346f195..13a8a10111 100644
--- a/lisp/gud.el
+++ b/lisp/gud.el
@@ -2184,20 +2184,23 @@ It is saved for when this flag is not set.")
(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 @@ Obeying it means displaying in another window the specified file and line."
;; 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)