From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs rendering comparisson between emacs23 and emacs26.3 Date: Mon, 06 Apr 2020 17:44:51 +0300 Message-ID: <834ktwsmfw.fsf@gnu.org> References: <20200403174757.GA8266@ACM> <20200404104553.GA5329@ACM> <07fe3b69-3ab2-3173-0696-cb17809e2b91@gmx.at> <83blo7v68b.fsf@gnu.org> <1845d7aa-9ae4-3d95-6a30-c7b1d8d8adec@gmx.at> <83a73qt6zs.fsf@gnu.org> <97c4254e-ff43-8402-3645-f713c408c245@gmx.at> <83y2r9syby.fsf@gnu.org> <20200405195753.GG5049@ACM> <542b48ba-4dfa-820f-ba50-4b147ab6d8e2@yandex.ru> <0a5f70aa-4985-8f8d-81d6-6ac4a60a94f9@yandex.ru> <838sj8sphk.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="99567"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, rrandresf@gmail.com, emacs-devel@gnu.org, rms@gnu.org, rudalics@gmx.at To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 06 16:45:38 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLT0M-000PmO-9x for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Apr 2020 16:45:38 +0200 Original-Received: from localhost ([::1]:33028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLT0L-00070i-DM for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Apr 2020 10:45:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34645) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLSzp-0006TW-Dn for emacs-devel@gnu.org; Mon, 06 Apr 2020 10:45:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jLSzo-00034Y-OG; Mon, 06 Apr 2020 10:45:04 -0400 Original-Received: from [176.228.60.248] (port=4657 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jLSzh-0001tL-CW; Mon, 06 Apr 2020 10:44:57 -0400 In-Reply-To: (message from Dmitry Gutov on Mon, 6 Apr 2020 16:55:11 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246528 Archived-At: > Cc: acm@muc.de, rudalics@gmx.at, rrandresf@gmail.com, rms@gnu.org, > emacs-devel@gnu.org > From: Dmitry Gutov > 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.