# HG changeset patch # User Juri Linkov # Date 1260225418 0 # Node ID 85eebb6799d75669a0bb9a9288c92431d75baddc # Parent fbf8c0853c944d17eb388fd39253c5256edc133d 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. diff -r fbf8c0853c94 -r 85eebb6799d7 lisp/ChangeLog --- a/lisp/ChangeLog Mon Dec 07 21:15:19 2009 +0000 +++ b/lisp/ChangeLog Mon Dec 07 22:36:58 2009 +0000 @@ -1,3 +1,12 @@ +2009-12-07 Juri Linkov + + 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. + 2009-12-07 Stefan Monnier * textmodes/tex-mode.el (latex-complete) diff -r fbf8c0853c94 -r 85eebb6799d7 lisp/comint.el --- a/lisp/comint.el Mon Dec 07 21:15:19 2009 +0000 +++ b/lisp/comint.el Mon Dec 07 22:36:58 2009 +0000 @@ -1422,11 +1422,11 @@ (t (if isearch-forward 'search-forward 'search-backward)))) found) - ;; Avoid lazy-highlighting matches in the comint prompt when - ;; searching forward. Lazy-highlight calls this lambda with the - ;; bound arg, so skip the comint prompt. - (if (and bound isearch-forward (< (point) (comint-line-beginning-position))) - (goto-char (comint-line-beginning-position))) + ;; Avoid lazy-highlighting matches in the comint prompt and in the + ;; output when searching forward. Lazy-highlight calls this lambda + ;; with the bound arg, so skip the prompt and the output. + (if (and bound isearch-forward (not (comint-after-pmark-p))) + (goto-char (process-mark (get-buffer-process (current-buffer))))) (or ;; 1. First try searching in the initial comint text (funcall search-fun string