emacs-devel
[Top][All Lists]
Advanced

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

Re: make-glyph-code incompatibility


From: Stefan Monnier
Subject: Re: make-glyph-code incompatibility
Date: Tue, 04 Mar 2008 11:02:04 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> The new make-glyph-code is a good change, but it introduces
>> an incompatibility.  It seems that it makes previously working code
>> fail silently.  Can we make it fail with an informative message?

> The new encoding still merges a face id and char code into
> an integer if the face id is < 64.  So an integer value may
> still carry a face id in the upper bits.

Is it worth the trouble?

> Of course, I could make it always use a cons cell for
> non-default face.

I thought that's what we did.  It would seem preferable because simpler.

> Then we could check (and warn) if an integer value is >= 1^22, but
> even if we do that, it can fail:

> For example, how do you differentiate

>     1 << 19 + ?a    (emacs 22 glyph code for 'a' in mode-line face)

> and the unicode character with the same numeric value in emacs 23 ?

Yes, it's a limitation to our ability to detect the problem.

> Also, issuing warnings during redisplay is a mess!

I was thinking maybe we could display such invalid glyphs as a string
"invalid-glyph".

But I definitely do not want to expand a lot of effort into
this checking.  I just figured that maybe there's a cheap way to detect
the problem and make the failure easier to diagnose (compared to "my
vertical tab line doesn't show any more" which is harder to debug
unless we know that the vertical tab line is using glyphs).


        Stefan




reply via email to

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