[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New optimisations for long raw strings in C++ Mode.
From: |
Alan Mackenzie |
Subject: |
Re: New optimisations for long raw strings in C++ Mode. |
Date: |
Wed, 10 Aug 2022 17:32:46 +0000 |
Hello, Eli.
On Wed, Aug 10, 2022 at 19:58:31 +0300, Eli Zaretskii wrote:
> > Date: Wed, 10 Aug 2022 16:50:43 +0000
> > Cc: gregory@heytings.org, larsi@gnus.org, emacs-devel@gnu.org
> > From: Alan Mackenzie <acm@muc.de>
> > On Wed, Aug 10, 2022 at 19:35:58 +0300, Eli Zaretskii wrote:
> > > > Date: Wed, 10 Aug 2022 16:23:27 +0000
> > > > Cc: gregory@heytings.org, larsi@gnus.org, emacs-devel@gnu.org
> > > > From: Alan Mackenzie <acm@muc.de>
> > > > CC Mode has not been doing anything wrong in accessing the buffers it
> > > > controls. The idea that one should access only the characters in the
> > > > (BEG END) supplied by fontification_functions (and jit-lock) is false.
> > > > It has no basis in rationality. And in fact, standard font-locking
> > > > itself accesses (via syntax-ppss) all character positions from BOB to
> > > > BEG.
> > > You seem to disagree with a major idea of the design of the Emacs
> > > display engine.
> > I don't think I do. I think you mean the idea of lazy fontification,
> > though you haven't been specific.
> No, I mean the idea that redisplay processes only a small amount of
> buffer text around the window.
I don't think such an idea is coherent, due to the lack of precision of
the word "processes". I understand that redisplay _fontifies_ only a
small amount of buffer text. However, it can get better results if it is
free to _look_ at text anywhere in the buffer.
You seem to be conflating "fontifying" with "looking at". I don't think
that's helpful.
> > This fontification is all about fontifying restricted areas of the
> > buffer. There is no principle that one shouldn't look at distant
> > portions of the buffer as need be, to facilitate the fontification of
> > the restricted area.
> You are contradicting yourself.
I can't see any contradiction in what I wrote there.
> > This is absolutely necessary correctly to fontify (long) strings and
> > comments, for example.
> Only if you assume the most simplistic processing.
If you open a file in its middle (e.g., by desktop), and there's an open
block comment there, you've got to look arbitrarily far back to detect
that state. In practice parse-partial-sexp from point-min will be used,
likely with cacheing of whatever sort.
--
Alan Mackenzie (Nuremberg, Germany).
- Re: New optimisations for long raw strings in C++ Mode., (continued)
- Re: New optimisations for long raw strings in C++ Mode., Gregory Heytings, 2022/08/10
- Re: New optimisations for long raw strings in C++ Mode., Eli Zaretskii, 2022/08/10
- Re: New optimisations for long raw strings in C++ Mode., Alan Mackenzie, 2022/08/10
- Re: New optimisations for long raw strings in C++ Mode., Eli Zaretskii, 2022/08/10
- Re: New optimisations for long raw strings in C++ Mode., Alan Mackenzie, 2022/08/10
- Re: New optimisations for long raw strings in C++ Mode., Eli Zaretskii, 2022/08/10
- Re: New optimisations for long raw strings in C++ Mode.,
Alan Mackenzie <=
- Re: New optimisations for long raw strings in C++ Mode., Eli Zaretskii, 2022/08/10
- Re: New optimisations for long raw strings in C++ Mode., Stefan Monnier, 2022/08/10
- Re: New optimisations for long raw strings in C++ Mode., Eli Zaretskii, 2022/08/11
- Re: New optimisations for long raw strings in C++ Mode., Stefan Monnier, 2022/08/11
- Re: New optimisations for long raw strings in C++ Mode., Immanuel Litzroth, 2022/08/11
- Re: New optimisations for long raw strings in C++ Mode., Alan Mackenzie, 2022/08/11
- Re: New optimisations for long raw strings in C++ Mode., Eli Zaretskii, 2022/08/11
- Re: New optimisations for long raw strings in C++ Mode., Lynn Winebarger, 2022/08/12
- Re: New optimisations for long raw strings in C++ Mode., Eli Zaretskii, 2022/08/12
- Re: New optimisations for long raw strings in C++ Mode., Yuri Khan, 2022/08/11