[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Aborting display. Is this possible?

From: Eli Zaretskii
Subject: Re: Aborting display. Is this possible?
Date: Mon, 20 Oct 2014 18:15:44 +0300

> Date: Mon, 20 Oct 2014 12:00:52 +0000
> From: Alan Mackenzie <address@hidden>
> Cc: address@hidden
> > > .  Thus it seems either the command loop or CC Mode is fontifying _every_
> > > position which PageDown is scanning over.
> >
> > How couldn't it?  Fontification affects how much material constitutes
> > one page full of material.
> I suppose this is true in the fully general case, when different faces
> on a GUI system can have different heights and widths.

The display engine doesn't know when it is in the "non-general" case
that allows it to make such shortcuts, except when the frame is a TTY

> Where in the source code, then, is this fontification being done as part
> of a scrolling command?

It's not part of a scrolling command, it is part of redisplay _after_
the scrolling command finishes.  See my other message with the
detailed description.

> In the usual situation in a programming mode, however, characters are
> going to be identical in size.  There must be room for optimisation
> somewhere.

This is false, for several reasons.

First, the display engine doesn't know anything about the semantics of
the modes -- it doesn't understand how a programming mode is different
from the other kind (and frankly, I'm not sure it is different, given
the wealth of optional display features people tend to use in
programming modes).

Second, even if we would introduce a feature through which a major
mode could tell the display engine that it is a "programming mode",
you are wrong when you assume the characters are identical in size.
Font-lock faces can legitimately be bold or slanted, in which case
their size will be different.  Emacs cannot know whether this is the
case without examining the buffer positions it is about to display.

I suppose we could add a feature whereby a mode or some other Lisp
(e.g., some user-defined code) could tell the display engine that the
buffer contents are "simple" in the sense that all the characters are
of the same size, and then request the optional features that violate
that to again tell the display engine.  But we don't have that now,
and never did.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]