diff options
| author | Paul Eggert | 2019-03-18 17:44:21 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-03-18 17:44:52 -0700 |
| commit | c0936672876bccc15e7899e83d8ab99910f8feee (patch) | |
| tree | 3f39a4f22c84b81944ce83b4087f22dab2d703b6 | |
| parent | bc2a93d5b7c3d749b31927452e31b32bdb1b9108 (diff) | |
| download | emacs-c0936672876bccc15e7899e83d8ab99910f8feee.tar.gz emacs-c0936672876bccc15e7899e83d8ab99910f8feee.zip | |
Remove buggy regexp use in comint-output-filter
This reverts commit 2012-07-02T16:18:02!monnier@iro.umontreal.ca
which perhaps could be rethought and recommitted, and perhaps
it’s no longer needed now that comint-use-prompt-regexp
is almost always nil.
* lisp/comint.el (comint-output-filter): Don’t try to skip
repeated prompts, since comint-prompt-regexp typically begins
with "^" and the resulting "^^" in the regular expression does
not have the desired effect. Noted by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00380.html
| -rw-r--r-- | lisp/comint.el | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index a71821baa5e..d21cc1378f7 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -2072,20 +2072,6 @@ Make backspaces delete the previous character." | |||
| 2072 | (goto-char (process-mark process)) | 2072 | (goto-char (process-mark process)) |
| 2073 | (set-marker comint-last-output-start (point)) | 2073 | (set-marker comint-last-output-start (point)) |
| 2074 | 2074 | ||
| 2075 | ;; Try to skip repeated prompts, which can occur as a result of | ||
| 2076 | ;; commands sent without inserting them in the buffer. | ||
| 2077 | (let ((bol (save-excursion (forward-line 0) (point)))) ;No fields. | ||
| 2078 | (when (and (not (bolp)) | ||
| 2079 | (looking-back comint-prompt-regexp bol)) | ||
| 2080 | (let* ((prompt (buffer-substring bol (point))) | ||
| 2081 | (prompt-re (concat "\\`" (regexp-quote prompt)))) | ||
| 2082 | (while (string-match prompt-re string) | ||
| 2083 | (setq string (substring string (match-end 0))))))) | ||
| 2084 | (while (string-match (concat "\\(^" comint-prompt-regexp | ||
| 2085 | "\\)\\1+") | ||
| 2086 | string) | ||
| 2087 | (setq string (replace-match "\\1" nil nil string))) | ||
| 2088 | |||
| 2089 | ;; insert-before-markers is a bad thing. XXX | 2075 | ;; insert-before-markers is a bad thing. XXX |
| 2090 | ;; Luckily we don't have to use it any more, we use | 2076 | ;; Luckily we don't have to use it any more, we use |
| 2091 | ;; window-point-insertion-type instead. | 2077 | ;; window-point-insertion-type instead. |