unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
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 17:56:14 +0300	[thread overview]
Message-ID: <83a6kswfsh.fsf@gnu.org> (raw)
In-Reply-To: <jwvr1e4ifhb.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sat, 04 Sep 2021 10:44:43 -0400)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: acm@muc.de,  emacs-devel@gnu.org
> Date: Sat, 04 Sep 2021 10:44:43 -0400
> 
> 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.

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?

> 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.

That's one thing to be documented (if being the first is indeed
important).  And you cannot explain that without telling something
about how this stuff works.

> > 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.

According to Aristotle's logic, you can tell anything you want about a
non-existing thing, and no one will be able to prove you wrong.

> >> 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.

They aren't internal, because faces are visible.

> Do you claim that it can result in a different rendering on screen?

That's one possibility, yes.  And for the functions that do something
other than fontifications, who knows what the results could be?

> 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?



  reply	other threads:[~2021-09-04 14:56 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
2021-09-04 14:56                           ` Eli Zaretskii [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a6kswfsh.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).