emacs-devel
[Top][All Lists]
Advanced

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

Re: Unfreezing the display during auto-repeated scrolling. Simpler appr


From: Alan Mackenzie
Subject: Re: Unfreezing the display during auto-repeated scrolling. Simpler approach.
Date: Mon, 27 Oct 2014 19:38:39 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hello, Eli.

On Mon, Oct 27, 2014 at 06:51:35PM +0200, Eli Zaretskii wrote:
> > Date: Mon, 27 Oct 2014 14:28:01 +0000
> > Cc: Eli Zaretskii <address@hidden>, address@hidden
> > From: Alan Mackenzie <address@hidden>

> > > Please take a look at what jit-lock-defer does.

> > It sets a non-nil fontified text-property without doing any
> > fontification (yet).  I think you're suggesting "binding"
> > jit-lock-defer over the scroll operation, thus inhibiting fontification. 

> > I've had a simpler idea: bind fontification-functions to nil over the
> > scroll operation.  This avoids many of the pitfalls of my last patch, and
> > can be perfectly specific to scrolling by whole screens and nothing else,
> > and is much simpler and less intrusive.  It works well.

> > Here's a patch, which does precisely that.  Comments welcome, as always:

> If jit-lock-defer-time produces the desired effect, I see no need to
> have yet another separate knob to achieve the same effect just during
> scrolling.

I've just tried out jit-lock-defer-time with 0.03s and 0.001s.  (Just as
a matter of interest, j-l-d-time changes only take effect on restarting
font-lock mode, so it's best to make changes with f-l mode disabled.)

At 0.03s, the effect on holding down PageDown was for seemingly all
screens to be displayed at they scrolled by, but unfontified.  There was
no waiting for Emacs to be ready for more keypresses after releasing the
PageDown key.  However, on single PageDowns, the fact that the text is
first displayed and only later (~0.1s) fontified could be disturbing to
some people.

At 0.001s, the screens scrolled by more stutteringly, some of them
managing to get fontified, with hints of colour visible from time to
time.  Otherwise, much like 0.03s.

Overall, using jit-lock-defer-time feels more like a workaround than a
solution, but perhaps I'm not the best person to judge.  If it were
possible, on auto-repeat, to have all screens displayed unfontified, yet
not have the 0.1s delay between delay and fontification on single
keypresses, that would be the best of all worlds.

In any case, some extra documentation on page "Scrolling" in the Emacs
manual is probably warranted.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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