Previous: , Up: Strings and Characters   [Contents][Index]


10.13 The Char Table

A char table is a table that maps characters (or ranges of characters) to values. Char tables are specialized for characters, only allowing particular sorts of ranges to be assigned values. Although this loses in generality, it makes for extremely fast (constant-time) lookups, and thus is feasible for applications that do an extremely large number of lookups (e.g. scanning a buffer for a character in a particular syntax, where a lookup in the syntax table must occur once per character).

Note that char tables as a primitive type, and all of the functions in this section, exist only in SXEmacs and XEmacs 20+. In XEmacs 19, char tables are generally implemented using a vector of 256 elements.

When MULE support exists, the types of ranges that can be assigned values are

When MULE support is not present, the types of ranges that can be assigned values are

Function: char-table-p object

This function returns non-nil if object is a char table.