The active display table is controlled by the variable
current-display-table. This is a specifier, which means
that you can specify separate values for it in individual buffers,
windows, frames, and devices, as well as a global value. It also
means that you cannot set this variable using setq; use
set-specifier instead. See Specifiers.
FSF Emacs uses window-display-table, buffer-display-table,
standard-display-table, etc. to control the display table.
However, specifiers are a cleaner and more powerful way of doing
the same thing. FSF Emacs also uses a different format for
the contents of a display table, using additional indirection
to a “glyph table” and such. Note that “glyph” has a different
meaning in SXEmacs.
The display table currently in use. This is a specifier.
Display tables are used to control how characters are displayed. Each time that redisplay processes a character, it is looked up in all the display tables that apply obtained by calling
specifier-instanceoncurrent-display-tableand any overriding display tables specified in currently active faces.The first entry found that matches the character determines how the character is displayed. If there is no matching entry, the default display method is used. Non-control characters are displayed as themselves and control characters are displayed according to the buffer-local variable
ctl-arrow. Control characters are further affected bycontrol-arrow-glyphandoctal-escape-glyph.Each instantiator in this specifier and the display-table specifiers in faces is a display table or a list of such tables. If a list, each table will be searched in turn for an entry matching a particular character. Each display table is one of
- A vector, specifying values for characters starting at 0.
- A char table, either of type
charorgeneric.- A range table.
Each entry in a display table should be one of
- nil (this entry is ignored and the search continues).
- A character (use this character; if it happens to be the same as the original character, default processing happens, otherwise redisplay attempts to display this character directly; #### At some point recursive display-table lookup will be implemented).
- A string (display each character in the string directly; #### At some point recursive display-table lookup will be implemented).
- A glyph (display the glyph; #### At some point recursive display-table lookup will be implemented when a string glyph is being processed).
- A cons of the form (format "string") where string is a printf-like spec used to process the character. #### Unfortunately no formatting directives other than %% are implemented.
- A vector (each element of the vector is processed recursively; in such a case, nil elements in the vector are simply ignored).
#### At some point in the near future, display tables are likely to be expanded to include other features, such as referencing characters in particular fonts and allowing the character search to continue all the way up the chain of specifier instantiators. These features are necessary to properly display Unicode characters.
Individual faces can also specify an overriding display table;
this is set using set-face-display-table. See Faces.
If no display table can be determined for a particular window, then SXEmacs uses the usual display conventions. See Usual Display.