diff options
| author | Juri Linkov | 2015-02-19 21:28:41 +0200 |
|---|---|---|
| committer | Juri Linkov | 2015-02-19 21:28:41 +0200 |
| commit | 6f2971ab761e62e649892bd3fe5c08983420c5ae (patch) | |
| tree | 0ad3864eba6ea30b2502aad592b41789f748cb22 | |
| parent | 65d8ac7c3729e9416696f77a7add8944e069da92 (diff) | |
| download | emacs-6f2971ab761e62e649892bd3fe5c08983420c5ae.tar.gz emacs-6f2971ab761e62e649892bd3fe5c08983420c5ae.zip | |
* lisp/comint.el (comint-line-beginning-position): Revert searching for
the prompt when comint-use-prompt-regexp is non-nil because it
doesn't distinguish input from output. Check the field property
`output' for the case when comint-use-prompt-regexp is nil.
Fixes: debbugs:19710
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/comint.el | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6373df64e91..22e952a91e6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2015-02-19 Juri Linkov <juri@linkov.net> | ||
| 2 | |||
| 3 | * comint.el (comint-line-beginning-position): Revert searching for | ||
| 4 | the prompt when comint-use-prompt-regexp is non-nil because it | ||
| 5 | doesn't distinguish input from output. Check the field property | ||
| 6 | `output' for the case when comint-use-prompt-regexp is nil. | ||
| 7 | (Bug#19710) | ||
| 8 | |||
| 1 | 2015-02-15 Jérémy Compostella <jeremy.compostella@gmail.com> | 9 | 2015-02-15 Jérémy Compostella <jeremy.compostella@gmail.com> |
| 2 | 10 | ||
| 3 | * net/tramp-sh.el (tramp-remote-process-environment): Disable paging | 11 | * net/tramp-sh.el (tramp-remote-process-environment): Disable paging |
diff --git a/lisp/comint.el b/lisp/comint.el index c81551acd5f..68b8edbb8ca 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -2267,8 +2267,6 @@ a buffer local variable." | |||
| 2267 | ;; Use comint-prompt-regexp | 2267 | ;; Use comint-prompt-regexp |
| 2268 | (save-excursion | 2268 | (save-excursion |
| 2269 | (beginning-of-line) | 2269 | (beginning-of-line) |
| 2270 | (unless (looking-at comint-prompt-regexp) | ||
| 2271 | (re-search-backward comint-prompt-regexp nil t)) | ||
| 2272 | (comint-skip-prompt) | 2270 | (comint-skip-prompt) |
| 2273 | (point)) | 2271 | (point)) |
| 2274 | ;; Use input fields. Note that, unlike the behavior of | 2272 | ;; Use input fields. Note that, unlike the behavior of |
| @@ -2278,7 +2276,10 @@ a buffer local variable." | |||
| 2278 | ;; if there are two fields on a line, then the first one is the | 2276 | ;; if there are two fields on a line, then the first one is the |
| 2279 | ;; prompt, and the second one is an input field, and is front-sticky | 2277 | ;; prompt, and the second one is an input field, and is front-sticky |
| 2280 | ;; (as input fields should be). | 2278 | ;; (as input fields should be). |
| 2281 | (constrain-to-field (field-beginning) (line-end-position)))) | 2279 | (constrain-to-field (if (eq (field-at-pos (point)) 'output) |
| 2280 | (line-beginning-position) | ||
| 2281 | (field-beginning)) | ||
| 2282 | (line-end-position)))) | ||
| 2282 | 2283 | ||
| 2283 | (defun comint-bol (&optional arg) | 2284 | (defun comint-bol (&optional arg) |
| 2284 | "Go to the beginning of line, then skip past the prompt, if any. | 2285 | "Go to the beginning of line, then skip past the prompt, if any. |