aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2009-12-07 22:36:58 +0000
committerJuri Linkov2009-12-07 22:36:58 +0000
commitd2a1dc7bc106840133daa9bbb48571d0b5a719ae (patch)
tree236a0c3d3fe10af313dab0d435d2afe05abd6680
parentfb10ee4af92130504c60b61e7ff1238ac18a7857 (diff)
downloademacs-d2a1dc7bc106840133daa9bbb48571d0b5a719ae.tar.gz
emacs-d2a1dc7bc106840133daa9bbb48571d0b5a719ae.zip
Don't lazy-highlight the comint output in history Isearch mode.
* comint.el (comint-history-isearch-search): Instead of `comint-line-beginning-position', use `comint-after-pmark-p' to check if point if before the process mark, and go to `process-mark' in this case.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/comint.el10
2 files changed, 14 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4045f553629..714a21a1a1c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12009-12-07 Juri Linkov <juri@jurta.org>
2
3 Don't lazy-highlight the comint output in history Isearch mode.
4
5 * comint.el (comint-history-isearch-search): Instead of
6 `comint-line-beginning-position', use `comint-after-pmark-p'
7 to check if point if before the process mark, and go to
8 `process-mark' in this case.
9
12009-12-07 Stefan Monnier <monnier@iro.umontreal.ca> 102009-12-07 Stefan Monnier <monnier@iro.umontreal.ca>
2 11
3 * textmodes/tex-mode.el (latex-complete) 12 * textmodes/tex-mode.el (latex-complete)
diff --git a/lisp/comint.el b/lisp/comint.el
index 92bfe24373f..c4dc3654554 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1422,11 +1422,11 @@ Intended to be added to `isearch-mode-hook' in `comint-mode'."
1422 (t 1422 (t
1423 (if isearch-forward 'search-forward 'search-backward)))) 1423 (if isearch-forward 'search-forward 'search-backward))))
1424 found) 1424 found)
1425 ;; Avoid lazy-highlighting matches in the comint prompt when 1425 ;; Avoid lazy-highlighting matches in the comint prompt and in the
1426 ;; searching forward. Lazy-highlight calls this lambda with the 1426 ;; output when searching forward. Lazy-highlight calls this lambda
1427 ;; bound arg, so skip the comint prompt. 1427 ;; with the bound arg, so skip the prompt and the output.
1428 (if (and bound isearch-forward (< (point) (comint-line-beginning-position))) 1428 (if (and bound isearch-forward (not (comint-after-pmark-p)))
1429 (goto-char (comint-line-beginning-position))) 1429 (goto-char (process-mark (get-buffer-process (current-buffer)))))
1430 (or 1430 (or
1431 ;; 1. First try searching in the initial comint text 1431 ;; 1. First try searching in the initial comint text
1432 (funcall search-fun string 1432 (funcall search-fun string