[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using uniprop_table_lookup (was: idn.el and confusables.txt)
From: |
Eli Zaretskii |
Subject: |
Re: Using uniprop_table_lookup (was: idn.el and confusables.txt) |
Date: |
Sat, 06 Aug 2011 19:52:39 +0300 |
> From: Kenichi Handa <address@hidden>
> Cc: address@hidden
> Date: Tue, 21 Jun 2011 11:07:02 +0900
>
> In article <address@hidden>, Eli Zaretskii <address@hidden> writes:
> > > Lisp_Object bidi_class_table = uniprop_table (intern ("bidi-class"));
> > >
> > > and get a property value for character CH as this:
> > >
> > > Lisp_Object bidi_class = uniprop_table_lookup (CH, bidi_class_table);
>
> > >
> > > In this case, what you actually get is an index number to the
> > > vector of property values (symbols nil, L, R, etc). See the
> > > comment of uniprop_table_lookup for the detail. */
> > >
> > > Eli, I arranged that bidi_class got as above is an integer
> > > value that is the same as enum bidi_type_t defined in
> > > dispextern.h.
>
> > This sounds good, but I think we should add a comment to both
> > dispextern.h and where you create the properties regarding the fact
> > that the order must be in sync if any changes are made in any of these
> > two places.
>
> Ok. By the way, as I got an idea of making the normal
> CHAR_TABLE_REF macro usable for getting an element of such
> table, please wait until I implement it.
I'm getting ready to use this feature instead of src/biditype.h. I
understand that CHAR_TABLE_REF is usable for this job already, and the
updated way of using uniprop_table in bidi.c is this:
Lisp_Object bidi_class_table = uniprop_table (intern ("bidi-class"));
...
Lisp_Object bidi_class = CHAR_TABLE_REF (CH, bidi_class_table);
If so, do I need to staticpro the bidi_class_table variable above? It
will be initialized only once, at startup time, and then used every
time bidi.c needs to look up the bidirectional properties of a
character.
Thanks.
- Re: Using uniprop_table_lookup (was: idn.el and confusables.txt),
Eli Zaretskii <=