From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: bug-reference-prog-mode slows down CC Mode's scrolling by ~7% Date: Sat, 04 Sep 2021 19:12:51 +0300 Message-ID: <83y28cuxoc.fsf@gnu.org> References: <838s0eyyjg.fsf@gnu.org> <83eea5ygub.fsf@gnu.org> <835yvgyijv.fsf@gnu.org> <83eea4wilj.fsf@gnu.org> <83a6kswfsh.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16923"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 04 18:17:24 2021 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 1mMYM8-00049V-KA for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Sep 2021 18:17:24 +0200 Original-Received: from localhost ([::1]:42990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMYM7-0007YJ-3z for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Sep 2021 12:17:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMYHk-0000R0-9r for emacs-devel@gnu.org; Sat, 04 Sep 2021 12:12:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36416) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMYHk-0004zp-1X; Sat, 04 Sep 2021 12:12:52 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4749 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMYHj-0004e0-KZ; Sat, 04 Sep 2021 12:12:51 -0400 In-Reply-To: (message from Stefan Monnier on Sat, 04 Sep 2021 11:55:08 -0400) 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:273920 Archived-At: > From: Stefan Monnier > Cc: acm@muc.de, emacs-devel@gnu.org > Date: Sat, 04 Sep 2021 11:55:08 -0400 > > >> But my understanding of what you're saying is that you don't consider > >> "how `jit-lock-bounds` are used" to be an internal detail. Instead you > >> consider these to be part of the "protocol" that the writer of client > >> functions needs to know in order for those functions to work correctly. > >> And I can't understand why you'd think that. I think even in the > >> current situation, none of what we have discussed has prompted a need or > >> desire to change client functions: they're oblivious to the change > >> being discussed. > > We have the reason right before our eyes: what Alan needs to do. If > > these details are not important, why does he work on changing them? > > His change is not to font-lock but to jit-lock. So it's consistent with > my claim that it's a matter that's internal to jit-lock. > > >> If so, could you give some kind of scenario where that could happen? > > Why do I need to come up with a scenario, when it's clear as a day > > that programming blindly to an insufficiently documented interface is > > asking for trouble? > > But the change under consideration does not affect the documentation of > the API exposed to client functions, AFAICT. I'm not asking the author > to program blindly. I just can't see any reason to specify any more > precisely than saying that BEG...END can be any valid region in the > buffer and that the function can use `jit-lock-bounds` to inform > jit-lock of the region actually handled, where this `jit-lock-bounds` > needs to cover BEG...END but is otherwise optional and only used for > optimization purposes. > > [ This is largely consistent with what you wrote in the docstring, so > it seems we agree on this part. ] > > The precise way in which jit-lock uses this info for optimization > purposes is something that may change (and hence should not be part of > the contract/documentation) as evidenced by the fact that Alan already > has 2 proposed patches that change it in different ways, and I myself > described yet another possible way it could be used. Let's agree to disagree about this, okay?