emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs rendering comparisson between emacs23 and emacs26.3


From: Eli Zaretskii
Subject: Re: emacs rendering comparisson between emacs23 and emacs26.3
Date: Mon, 06 Apr 2020 17:44:51 +0300

> Cc: address@hidden, address@hidden, address@hidden, address@hidden,
>  address@hidden
> From: Dmitry Gutov <address@hidden>
> Date: Mon, 6 Apr 2020 16:55:11 +0300
> 
> On 06.04.2020 16:39, Eli Zaretskii wrote:
> > People often forget that scrolling is implemented partially in the
> > command that is invoked by the likes of C-v, and partially in the
> > display engine.  Binding a variable in the command only affects the
> > former part, but not the latter.
> 
> I thought binding fontification-functions to nil was done there exactly 
> with that intent: to affect what the display engine subsequently does. 

Can't be done, because redisplay runs only _after_ the scroll command
returns, at which point this binding is undone.  You can easily see
this in a debugger: put a breakpoint inside redisplay_internal right
after the specbind line is executed, then type

  (gdb) p Fsymbol_value (Qfontification_functions)

You will see the value is a cons cell, not nil.

What that binding does is affect the portions of display code that are
run as part of window_scroll_pixel_based, which the scroll command
calls to calculate a suitable position of window-start by simulating
display.  That display code runs with fontifications disabled, which
makes it faster.

All the scroll commands in Emacs do is more or less calculate the
window-start point; the rest is done when redisplay kicks in.



reply via email to

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