From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: acm@muc.de, emacs-devel@gnu.org
Subject: Re: bug-reference-prog-mode slows down CC Mode's scrolling by ~7%
Date: Sat, 04 Sep 2021 10:44:43 -0400 [thread overview]
Message-ID: <jwvr1e4ifhb.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83eea4wilj.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Sep 2021 16:55:36 +0300")
>> > I'm looking at this from the POV of someone who writes a function to
>> > be registered with JIT font-lock. They need to understand these
>> > details to be able to write code which will do what they want.
>> Why should they?
> To achieve their goals, of course.
[ I'll call "client functions" those functions passed to
`jit-lock-register`, like `font-lock-fontify-region`,
`goto-address-fontify-region`, `bug-reference-fontify`, ... ]
I still can't see in which way the specific details of how jit-lock
chooses the BEG...END arguments and uses the returned `jit-lock-bounds`
affects the authors of client functions.
> I really don't understand why we are having this conversation. It's
> almost as if you claimed that documenting non-trivial behavior is a
> bad idea, or a luxury. But you cannot be seriously thinking that.
I think it's a bad idea to document internal details, yes.
Those who need to know those details can look at the code.
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.
The only part where it might be visible is in a new argument to
`jit-lock-register` that would specify whether a client function would
like to come first or not.
> Excuse me, but the jit-lock-bounds was almost completely undocumented,
> until I did that a few days ago. So what description are you alluding
> to which has been valid?
The implicit one that comes from the range of ways those client
functions could be called in the past and how their return value could
be used. The change makes almost no difference in this respect (it
might change the frequency of some cases, but most of the behaviors that
are possible in the new setup were also possible in the old setup).
>> I don't see in what sense "the results will be different".
>> Which results are you talking a bout?
> The results of running jit-lock-functions. those which really perform
> fontifications result in faces, others result in whatever they do.
Yes, the code is different, so there are differences in the result of
some internal steps. But those "results" are internal. Why would
anyone care about them. Who and how or when would notice them?
Do you claim that it can result in a different rendering on screen?
Or do you claim that it can result in the need to write client
functions differently?
If so, could you give some kind of scenario where that could happen?
If not, what else?
Stefan
next prev parent reply other threads:[~2021-09-04 14:44 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-01 17:33 bug-reference-prog-mode slows down CC Mode's scrolling by ~7% Alan Mackenzie
2021-09-01 17:44 ` Eli Zaretskii
2021-09-01 17:55 ` Alan Mackenzie
2021-09-01 18:01 ` Eli Zaretskii
2021-09-01 18:20 ` Alan Mackenzie
2021-09-01 18:28 ` Eli Zaretskii
2021-09-01 19:19 ` Alan Mackenzie
2021-09-01 20:59 ` Stefan Monnier
2021-09-02 6:26 ` Eli Zaretskii
2021-09-02 16:57 ` Alan Mackenzie
2021-09-02 18:46 ` Stefan Monnier
2021-09-02 19:24 ` Alan Mackenzie
2021-09-02 21:08 ` Alan Mackenzie
2021-09-03 6:16 ` Eli Zaretskii
2021-09-03 12:30 ` Stefan Monnier
2021-09-03 12:38 ` Eli Zaretskii
2021-09-03 22:25 ` Stefan Monnier
2021-09-04 6:13 ` Eli Zaretskii
2021-09-04 13:36 ` Stefan Monnier
2021-09-04 13:55 ` Eli Zaretskii
2021-09-04 14:44 ` Stefan Monnier [this message]
2021-09-04 14:56 ` Eli Zaretskii
2021-09-04 15:55 ` Stefan Monnier
2021-09-04 16:12 ` Eli Zaretskii
2021-09-04 16:24 ` Stefan Monnier
2021-09-04 16:28 ` Eli Zaretskii
2021-09-04 16:40 ` Stefan Monnier
2021-09-03 6:10 ` Eli Zaretskii
2021-09-03 10:47 ` Alan Mackenzie
2021-09-03 11:24 ` Eli Zaretskii
2021-09-03 16:15 ` Alan Mackenzie
2021-09-03 12:27 ` Stefan Monnier
2021-09-03 12:19 ` Stefan Monnier
2021-09-03 12:35 ` Eli Zaretskii
2021-09-03 16:52 ` Alan Mackenzie
2021-09-03 20:51 ` Alan Mackenzie
2021-09-04 6:09 ` Eli Zaretskii
2021-09-04 14:50 ` Alan Mackenzie
2021-09-04 15:00 ` Stefan Monnier
2021-09-04 15:32 ` Alan Mackenzie
2021-09-04 15:36 ` Eli Zaretskii
2021-09-04 15:43 ` Alan Mackenzie
2021-09-04 15:48 ` Eli Zaretskii
2021-09-04 16:05 ` Alan Mackenzie
2021-09-04 16:15 ` Eli Zaretskii
2021-09-06 10:46 ` Alan Mackenzie
2021-09-06 11:10 ` Eli Zaretskii
2021-09-06 19:08 ` Alan Mackenzie
2021-09-06 19:23 ` Eli Zaretskii
2021-09-18 11:37 ` Alan Mackenzie
2021-09-18 11:59 ` Eli Zaretskii
2021-09-06 21:59 ` andrés ramírez
2021-09-07 19:47 ` Alan Mackenzie
2021-09-07 17:57 ` andrés ramírez
2021-09-06 13:24 ` Stefan Monnier
2021-09-04 16:06 ` Stefan Monnier
2021-09-04 16:23 ` Eli Zaretskii
2021-09-04 16:39 ` Stefan Monnier
2021-09-04 17:19 ` Eli Zaretskii
2021-09-04 17:47 ` Stefan Monnier
2021-09-04 18:10 ` Eli Zaretskii
2021-09-04 18:40 ` Stefan Monnier
2021-09-11 12:49 ` Eli Zaretskii
2021-09-11 17:04 ` Stefan Monnier
2021-09-11 17:17 ` Eli Zaretskii
2021-09-11 18:00 ` Stefan Monnier
2021-09-11 18:16 ` Eli Zaretskii
2021-09-11 19:55 ` Stefan Monnier
2021-09-12 3:51 ` Eli Zaretskii
2021-09-12 16:41 ` Stefan Monnier
2021-09-12 16:53 ` Eli Zaretskii
2021-09-12 17:41 ` Stefan Monnier
2021-09-12 17:55 ` Eli Zaretskii
2021-09-12 21:11 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvr1e4ifhb.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=acm@muc.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.