emacs-devel
[Top][All Lists]
Advanced

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

Re: Invisibility bug: `invisible' vs `display'


From: Kim F. Storm
Subject: Re: Invisibility bug: `invisible' vs `display'
Date: Thu, 22 Feb 2007 12:27:01 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux)

Daniel Brockman <address@hidden> writes:

> When folding stretches of code, it does not make sense to
> have images in between cluster all together and stick out
> in spite of the invisibility of the region.

That is clearly a bug.

> This patch fixes the problem for me.

Thank you.

Mixing invisible and display properties -- with the desire to actually
get the effects of the display property looks very obscure to me, and
cannot image that any code is actually relying on such functionality.

I think the change is safe, so I installed it.



> *** old/emacs/src/xdisp.c     2006-12-30 00:29:45.000000000 +0100
> --- new/emacs/src/xdisp.c     2007-02-22 03:29:37.000000000 +0100
> ***************
> *** 762,769 ****
>     /* Handle `face' before `display' because some sub-properties of
>        `display' need to know the face.  */
>     {&Qface,          FACE_PROP_IDX,          handle_face_prop},
> -   {&Qdisplay,               DISPLAY_PROP_IDX,       handle_display_prop},
>     {&Qinvisible,             INVISIBLE_PROP_IDX,     handle_invisible_prop},
>     {&Qcomposition,   COMPOSITION_PROP_IDX,   handle_composition_prop},
>     {NULL,            0,                      NULL}
>   };
> --- 762,769 ----
>     /* Handle `face' before `display' because some sub-properties of
>        `display' need to know the face.  */
>     {&Qface,          FACE_PROP_IDX,          handle_face_prop},
>     {&Qinvisible,             INVISIBLE_PROP_IDX,     handle_invisible_prop},
> +   {&Qdisplay,               DISPLAY_PROP_IDX,       handle_display_prop},
>     {&Qcomposition,   COMPOSITION_PROP_IDX,   handle_composition_prop},
>     {NULL,            0,                      NULL}
>   };
>
> I don't know enough about the display code to be able to say
> whether this is a safe change, but it seems very logical to
> me to handle the `invisible' property first, since invisible
> text should just be skipped.
>
> In fact, why not move it all the way to the top of that list?

It seems like the natural thing to do, but I'm not confident that
it is ok to skip handling the `fontified' property.

But it seems superfluous to process face properties on invisible text,
so it looks safe to move Qinvisible before the Qface entry.
Can anyone see any problems with that??

--
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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