help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C-x 3 C-s foo Only window with cursor "lights up" foo


From: Stefan Monnier
Subject: Re: C-x 3 C-s foo Only window with cursor "lights up" foo
Date: Fri, 04 Feb 2005 18:49:17 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

> | > It is also marked in all windows (i.e. the highlighting of the
> | > "future marks" is also applied to the buffer, not just the window),
> | > AFAIK.  But it's only applied to the region of the buffer that's
> | > visible in the main window, so other windows won't see any of it
> | > unless they show an overlapping part of the buffer.
> | 
> | In my Emacs it is not the case. I'm running CVS Emacs from July 2004
> | in Windows XP. Not that it is very important for me, I just wanted to
> | present this fact.

> [ snip ]
 
> | The highligting for the "future" marks is only visible in one of the
> | windows.

> Same behavior here, Emacs 21.3.50 on FreeBSD, built 15 minutes ago.

Oops, you're right, isearch actually goes to the trouble to make the
"lazy hilighting" only active in the main window.
This was done apparently on-purpose, by RMS in the following change:

   revision 1.172
   date: 2001/01/03 00:18:53;  author: rms;  state: Exp;  lines: +76 -86
   Do highlighting of alternative matches all at once,
   but only do it in the text that's visible in the selected window.
   
   (isearch-lazy-highlight-cleanup): Arg now says
   to remove all the current alternative-match highlighting.
   If nil, remove only what's outside the current window.
   (isearch-lazy-highlight-remove-overlays): Take optional
   region within which NOT to remove them.
   (isearch-lazy-highlight-new-loop): Greatly simplified.
   (isearch-lazy-highlight-update): Find all the other occurrences
   visible in the window, in just one call.
   
   (isearch-lazy-highlight-start): Now holds start of region to scan.
   (isearch-lazy-highlight-end): Now holds end of region to scan.
   (isearch-lazy-highlight-wrapped): Variable deleted.
   (isearch-lazy-highlight-search): Function deleted.
   ----------------------------

The relevant pat of the corresponding diff is:

@@ -1989,26 +1995,10 @@
                  (overlay-put ov 'face isearch-lazy-highlight-face))
 
                (overlay-put ov 'priority 0)
+               ;; Don't highlight on any other windows.
+               (overlay-put ov 'window isearch-lazy-highlight-window)
 

This code has changed, but the `window' property on the overlay has been
preserved since.

If you don't like it, you should send a bug report about it with M-x
report-emacs-bug.


        Stefan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]