Mercurial > emacs
comparison lisp/comint.el @ 32598:b7462e534fdc
(comint-output-filter):
Fixup comint-last-input-end too.
Remove commented-out call to force-mode-line-update.
(comint-kill-output):
Use `forward-line 0' instead of beginning-of-line to make sure we get
past the prompt.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 18 Oct 2000 01:43:01 +0000 |
parents | b8132c394173 |
children | 6aece997f0f9 |
comparison
equal
deleted
inserted
replaced
32597:df31899ab320 | 32598:b7462e534fdc |
---|---|
1515 ;; to `t', to cause point in non-select windows to advance. | 1515 ;; to `t', to cause point in non-select windows to advance. |
1516 (insert-before-markers string) | 1516 (insert-before-markers string) |
1517 ;; Fixup markers and overlays that got screwed up because we | 1517 ;; Fixup markers and overlays that got screwed up because we |
1518 ;; used `insert-before-markers'. | 1518 ;; used `insert-before-markers'. |
1519 (let ((old-point (- (point) (length string)))) | 1519 (let ((old-point (- (point) (length string)))) |
1520 ;; comint-last-output-start marker | 1520 ;; comint-last-output-start |
1521 (set-marker comint-last-output-start old-point) | 1521 (set-marker comint-last-output-start old-point) |
1522 ;; comint-last-input-end | |
1523 (when (and comint-last-input-end | |
1524 (equal (marker-position comint-last-input-end) | |
1525 (point))) | |
1526 (set-marker comint-last-input-end old-point)) | |
1522 ;; No overlays we create are set to advance upon insertion | 1527 ;; No overlays we create are set to advance upon insertion |
1523 ;; (at the start/end), so we assume that any overlay which | 1528 ;; (at the start/end), so we assume that any overlay which |
1524 ;; is at the current point was incorrectly advanced by | 1529 ;; is at the current point was incorrectly advanced by |
1525 ;; insert-before-markers. First fixup overlays that might | 1530 ;; insert-before-markers. First fixup overlays that might |
1526 ;; start at point: | 1531 ;; start at point: |
1576 (let ((over (make-overlay prompt-start (point)))) | 1581 (let ((over (make-overlay prompt-start (point)))) |
1577 (overlay-put over 'face 'comint-highlight-prompt-face) | 1582 (overlay-put over 'face 'comint-highlight-prompt-face) |
1578 (overlay-put over 'front-sticky t) | 1583 (overlay-put over 'front-sticky t) |
1579 (overlay-put over 'rear-nonsticky t) | 1584 (overlay-put over 'rear-nonsticky t) |
1580 (setq comint-last-prompt-overlay over)))))) | 1585 (setq comint-last-prompt-overlay over)))))) |
1581 | |
1582 ;;(force-mode-line-update) | |
1583 | 1586 |
1584 (goto-char saved-point) | 1587 (goto-char saved-point) |
1585 | 1588 |
1586 (run-hook-with-args 'comint-output-filter-functions string))))))) | 1589 (run-hook-with-args 'comint-output-filter-functions string))))))) |
1587 | 1590 |
1873 (interactive) | 1876 (interactive) |
1874 (let ((proc (get-buffer-process (current-buffer))) | 1877 (let ((proc (get-buffer-process (current-buffer))) |
1875 (replacement nil)) | 1878 (replacement nil)) |
1876 (save-excursion | 1879 (save-excursion |
1877 (let ((pmark (progn (goto-char (process-mark proc)) | 1880 (let ((pmark (progn (goto-char (process-mark proc)) |
1878 (beginning-of-line nil) | 1881 (forward-line 0) |
1879 (point-marker)))) | 1882 (point-marker)))) |
1880 (delete-region comint-last-input-end pmark) | 1883 (delete-region comint-last-input-end pmark) |
1881 (goto-char (process-mark proc)) | 1884 (goto-char (process-mark proc)) |
1882 (setq replacement (concat "*** output flushed ***\n" | 1885 (setq replacement (concat "*** output flushed ***\n" |
1883 (buffer-substring pmark (point)))) | 1886 (buffer-substring pmark (point)))) |