[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: A vision for multiple major modes: some design notes
From: |
Drew Adams |
Subject: |
RE: A vision for multiple major modes: some design notes |
Date: |
Thu, 21 Apr 2016 13:26:53 -0700 (PDT) |
> > But just what does "the parts that affect redisplay" mean?
> > If we mean parts that need to do something particular wrt
> > redisplay, then yes, that makes sense.
>
> I mean the part that is needed for redisplay to behave in each island
> according to user expectations. For example, imagine that a mode that
> is relevant to a certain island chain sets up face-remapping-alist in
> some particular way -- when redisplay does its job, it repeatedly
> consults this variable when it needs to compute faces. I'm saying
> that the part of the changes for this feature that affects redisplay
> will have to arrange for recalculation of the value of
> face-remapping-alist when the display engine gets to examining the
> portion of buffer text that belongs to this island chain. Since the
> position where the display engine processes is not visible to Lisp,
> this arrangement will have to be in C. And similarly with any other
> variable whose value the display engine accesses from its C code, like
> standard-display-table, for example.
Thanks for the example. That's the kind of thing I thought
you had in mind.
> > You mentioned earlier that redisplay needs to access
> > buffer-local variables as it moves through the buffer.
> > And you said that redisplay needs to get the right values
> > of such variables.
> >
> > But for some island-chain operations, e.g. some that I'm
> > thinking of that do not care about the mode of a chain
> > or whether it even has a mode, I don't see why redisplay
> > would need to do anything special.
>
> This could be so in some particular use cases, but it's not
> so in general.
Depends on what one means by "in general". ;-) To me, having
a different mode associated with a chain is a special case of
either having such a mode or not having one. Likewise, for
having chain-local variables or not. Both having and not
having are special cases of "in general".
> Modes do affect the way text is displayed.
Yes. But if a chain does not use a mode that is different
from the buffer's mode, then there should be no special
mode-specific handling needed for it.
> Besides, Alan says that "most" buffer-local variables will
> become island-chain local. If we believe him, then your
> use cases you mention above are lucky exceptions rather
> than the rule.
I don't see them as either lucky exceptions or the rule.
I imagine that there are lots of possible uses of a chain
of islands of text, some of which involve a different mode
or in some other way involve different display possibilities,
and some of which do not.
>From the point of view of C code (e.g. redisplay) modification,
the latter use cases would I guess be lucky (little or nothing
new to do). That doesn't mean they would be exceptional (rare)
in terms of user use cases. (Dunno know whether they would be.)
- RE: A vision for multiple major modes: some design notes, (continued)
- RE: A vision for multiple major modes: some design notes, Drew Adams, 2016/04/20
- RE: A vision for multiple major modes: some design notes, Drew Adams, 2016/04/20
- Re: A vision for multiple major modes: some design notes, Alan Mackenzie, 2016/04/21
- RE: A vision for multiple major modes: some design notes, Drew Adams, 2016/04/21
- Re: A vision for multiple major modes: some design notes, Eli Zaretskii, 2016/04/21
- RE: A vision for multiple major modes: some design notes, Drew Adams, 2016/04/21
- Re: A vision for multiple major modes: some design notes, Eli Zaretskii, 2016/04/21
- RE: A vision for multiple major modes: some design notes,
Drew Adams <=
Re: A vision for multiple major modes: some design notes, Phillip Lord, 2016/04/20
Re: A vision for multiple major modes: some design notes, Eli Zaretskii, 2016/04/21
Re: A vision for multiple major modes: some design notes, Eli Zaretskii, 2016/04/22
Re: A vision for multiple major modes: some design notes, Alan Mackenzie, 2016/04/21