[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Pat
From: |
Juri Linkov |
Subject: |
bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch] |
Date: |
Thu, 21 Feb 2013 02:45:31 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) |
>> The result is that the first space character is not lazy-highlighted.
>> I think this is wrong.
>
> :-). I'm not sure. It has a certain logic behind it. I think a missing
> lazy-highlight is much less disturbing than an obtrusive one.
Alan, I completely agree with you. Your logic makes perfect sense.
An obtrusive lazy-highlight is too disturbing.
But I also think that my logic makes sense as well
since a missing lazy-highlight is too bad.
Fortunately, it is possible to combine both logics
with a small patch that you can see below.
The key point is that the lazy-highlighting loop should start
from the same position where the main search function found
the beginning of the match!
Currently the boundary of the lazy-highlighting loop starts at the end
of the found match (the value of `(point)'). But the match found by
the main search function (and highlighted by the primary face `isearch')
begins at `isearch-other-end'. So currently they are mutually inconsistent.
This patch moves the boundary of lazy-highlighting from the end
of the found match to its beginning - like in the main search function.
Thus it brings the logic of `isearch-lazy-highlight-search' closer to
the logic of the main search function in `isearch-search'.
In the result of removing this inconsistency, this patch passes
the test case that you posted in your original bug report,
i.e. placing point at the start of the second paragraph
(" Each entry in a ....") and typing `C-s M-s C-e' (isearch-yank-line)
doesn't highlight the gap preceding the paragraph with lazy-highlight face.
And it also passes other tests that I tried.
=== modified file 'lisp/isearch.el'
--- lisp/isearch.el 2013-02-01 23:38:41 +0000
+++ lisp/isearch.el 2013-02-21 00:45:05 +0000
@@ -2936,8 +2936,8 @@ (defun isearch-lazy-highlight-new-loop (
(setq isearch-lazy-highlight-window (selected-window)
isearch-lazy-highlight-window-start (window-start)
isearch-lazy-highlight-window-end (window-end)
- isearch-lazy-highlight-start (point)
- isearch-lazy-highlight-end (point)
+ isearch-lazy-highlight-start (or isearch-other-end (point))
+ isearch-lazy-highlight-end (or isearch-other-end (point))
isearch-lazy-highlight-wrapped nil
isearch-lazy-highlight-last-string isearch-string
isearch-lazy-highlight-case-fold-search isearch-case-fold-search
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], (continued)
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Glenn Morris, 2013/02/14
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Juri Linkov, 2013/02/15
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Juri Linkov, 2013/02/15
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Alan Mackenzie, 2013/02/15
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Alan Mackenzie, 2013/02/15
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Juri Linkov, 2013/02/16
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Juri Linkov, 2013/02/17
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Alan Mackenzie, 2013/02/19
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Juri Linkov, 2013/02/20
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Alan Mackenzie, 2013/02/20
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch],
Juri Linkov <=
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Alan Mackenzie, 2013/02/21
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Glenn Morris, 2013/02/21
- bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch], Juri Linkov, 2013/02/21