[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: display problem
From: |
Kenichi Handa |
Subject: |
Re: display problem |
Date: |
Mon, 28 May 2007 21:24:29 +0900 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.0 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
In article <address@hidden>, Jason Rumney <address@hidden> writes:
> Miles Bader wrote:
> > The "19" should be "21" in the unicode branch.
> >
> >
> I'm not sure I understand what this magic number 19/21 is. Is there a
> constant for it that could be substituted?
That number should be the same as this in src/lisp.h.
#define CHARACTERBITS 22
I've just installed changes for glyph-char and glyph-face
for the same reason.
> I'm surprised that that is the only change needed. The code points
> between the unicode branch and Emacs 22 should be completely different,
> shouldn't they?
Yes. But, the ASCII character codes are the same. So, the
following code doesn't have to be changed as far as it uses
the correct version of make-glyph-code.
(aset standard-display-table
?\014
(vconcat "\n"
(mapcar (lambda (c) (make-glyph-code c 'my-highlight))
" Section (Printable Page) ")))
It should also work even if the string "Section (Printable
Page)" contains non-ASCII characters as far as the file
containing that code is decoded correctly at the time of
loading.
By the way, in emacs-unicode-2, make-glyph-code doesn't work
for a face of ID greater than 511 (in Emacs 22, maximum face
ID is 4095. I think there are fairly easy two ways to
increase this limit.
(1) By contriving the usage of bits.
For instance, by using 1-bit as a flag, we can use 13-bit
faces for all Unicode BMP characters, and 8-bit faces for
the other less-frequenty-used characters.
(2) By using a table that maps 511 face codes to the actual
face IDs.
The table registers all faces given to make-glyph-code. So,
at most 511 different faces can be used in make-glyph-code.
And the both methods can be combined.
Is it worth doing such a work? Currently:
(length (face-list)) => 140
So we won't reach the limit 511 for a while.
---
Kenichi Handa
address@hidden
- display problem, Drew Adams, 2007/05/27
- Re: display problem, Jason Rumney, 2007/05/27
- RE: display problem, Drew Adams, 2007/05/27
- Re: display problem, Jason Rumney, 2007/05/28
- Re: display problem, Miles Bader, 2007/05/28
- Re: display problem,
Kenichi Handa <=
- RE: display problem, Drew Adams, 2007/05/28
- Re: display problem, Eli Zaretskii, 2007/05/28
- Re: display problem, Kenichi Handa, 2007/05/28
- Re: display problem, Richard Stallman, 2007/05/29
- Re: display problem, Eli Zaretskii, 2007/05/29
- Re: display problem, Miles Bader, 2007/05/29
- Re: display problem, Kim F. Storm, 2007/05/29
- Re: display problem, Eli Zaretskii, 2007/05/29
- Re: display problem, Eli Zaretskii, 2007/05/29
- Re: display problem, David Kastrup, 2007/05/30