aboutsummaryrefslogtreecommitdiffstats
path: root/src/chartab.c
diff options
context:
space:
mode:
authorEli Zaretskii2011-08-15 20:47:25 +0300
committerEli Zaretskii2011-08-15 20:47:25 +0300
commit474a84653b4aa5a10b49af751c3008a4c582422c (patch)
tree352c73a638573275b43ddd941bad2c6e6c7e9d9b /src/chartab.c
parent934eacb93d0b8340a3a8b478deaa6110a3de083f (diff)
downloademacs-474a84653b4aa5a10b49af751c3008a4c582422c.tar.gz
emacs-474a84653b4aa5a10b49af751c3008a4c582422c.zip
Use uniprop tables instead of biditype.h and bidimirror.h.
src/bidi.c (bidi_initialize): Use uniprop_table instead of including biditype.h and bidimirror.h. src/biditype.h: File removed. src/bidimirror.h: File removed. src/deps.mk (bidi.o): Remove biditype.h and bidimirror.h. src/makefile.w32-in ($(BLD)/bidi.$(O)): Remove biditype.h and bidimirror.h. src/dispextern.h: Fix a typo in the comment to bidi_type_t. src/chartab.c: Improve commentary for the uniprop_table API. admin/unidata/bidimirror.awk: File removed. admin/unidata/biditype.awk: File removed. admin/unidata/makefile.w32-in (all): Remove src/biditype.h and src/bidimirror.h. (../../src/biditype.h, ../../src/bidimirror.h): Deleted. admin/unidata/Makefile.in (all): Remove src/biditype.h and src/bidimirror.h. (../../src/biditype.h, ../../src/bidimirror.h): Deleted.
Diffstat (limited to 'src/chartab.c')
-rw-r--r--src/chartab.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/chartab.c b/src/chartab.c
index fb72004356e..0cabaac4cf5 100644
--- a/src/chartab.c
+++ b/src/chartab.c
@@ -1095,22 +1095,31 @@ map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object),
1095 1095
1096/* Unicode character property tables. 1096/* Unicode character property tables.
1097 1097
1098 This section provides a convenient and efficient way to get a 1098 This section provides a convenient and efficient way to get Unicode
1099 Unicode character property from C code (from Lisp, you must use 1099 character properties of characters from C code (from Lisp, you must
1100 get-char-code-property). 1100 use get-char-code-property).
1101 1101
1102 The typical usage is to get a char-table for a specific property at 1102 The typical usage is to get a char-table object for a specific
1103 a proper initialization time as this: 1103 property like this (use of the "bidi-class" property below is just
1104 an example):
1104 1105
1105 Lisp_Object bidi_class_table = uniprop_table (intern ("bidi-class")); 1106 Lisp_Object bidi_class_table = uniprop_table (intern ("bidi-class"));
1106 1107
1107 and get a property value for character CH as this: 1108 (uniprop_table can return nil if it fails to find data for the
1109 named property, or if it fails to load the appropriate Lisp support
1110 file, so the return value should be tested to be non-nil, before it
1111 is used.)
1108 1112
1109 Lisp_Object bidi_class = CHAR_TABLE_REF (CH, bidi_class_table); 1113 To get a property value for character CH use CHAR_TABLE_REF:
1114
1115 Lisp_Object bidi_class = CHAR_TABLE_REF (bidi_class_table, CH);
1110 1116
1111 In this case, what you actually get is an index number to the 1117 In this case, what you actually get is an index number to the
1112 vector of property values (symbols nil, L, R, etc). 1118 vector of property values (symbols nil, L, R, etc).
1113 1119
1120 The full list of Unicode character properties supported by Emacs is
1121 documented in the ELisp manual, in the node "Character Properties".
1122
1114 A table for Unicode character property has these characteristics: 1123 A table for Unicode character property has these characteristics:
1115 1124
1116 o The purpose is `char-code-property-table', which implies that the 1125 o The purpose is `char-code-property-table', which implies that the
@@ -1122,7 +1131,7 @@ map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object),
1122 means that we don't have to decode values. 1131 means that we don't have to decode values.
1123 1132
1124 o The third extra slot is a Lisp function, an index (integer) to 1133 o The third extra slot is a Lisp function, an index (integer) to
1125 the array uniprop_enncoder[], or nil. If it is a Lisp function, we 1134 the array uniprop_encoder[], or nil. If it is a Lisp function, we
1126 can't use such a table from C (at the moment). If it is nil, it 1135 can't use such a table from C (at the moment). If it is nil, it
1127 means that we don't have to encode values. */ 1136 means that we don't have to encode values. */
1128 1137