comparison man/lispref/display.texi @ 408:501cfd01ee6d r21-2-34

Import from CVS: tag r21-2-34
author cvs
date Mon, 13 Aug 2007 11:18:11 +0200
parents 74fd4e045ea6
children 697ef44129c6
comparison
equal deleted inserted replaced
407:ed6218a7d4d3 408:501cfd01ee6d
993 However, specifiers are a cleaner and more powerful way of doing 993 However, specifiers are a cleaner and more powerful way of doing
994 the same thing. FSF Emacs also uses a different format for 994 the same thing. FSF Emacs also uses a different format for
995 the contents of a display table, using additional indirection 995 the contents of a display table, using additional indirection
996 to a ``glyph table'' and such. Note that ``glyph'' has a different 996 to a ``glyph table'' and such. Note that ``glyph'' has a different
997 meaning in XEmacs.) 997 meaning in XEmacs.)
998
999 @defvar current-display-table
1000
1001 The display table currently in use. This is a specifier.
1002
1003 Display tables are used to control how characters are displayed. Each
1004 time that redisplay processes a character, it is looked up in all the
1005 display tables that apply (obtained by calling @code{specifier-instance}
1006 on @code{current-display-table} and any overriding display tables
1007 specified in currently active faces). The first entry found that
1008 matches the character determines how the character is displayed. If
1009 there is no matching entry, the default display method is
1010 used. (Non-control characters are displayed as themselves and control
1011 characters are displayed according to the buffer-local variable
1012 @code{ctl-arrow}. Control characters are further affected by
1013 @code{control-arrow-glyph} and @code{octal-escape-glyph}.)
1014
1015 Each instantiator in this specifier and the display-table specifiers
1016 in faces is a display table or a list of such tables. If a list, each
1017 table will be searched in turn for an entry matching a particular
1018 character. Each display table is one of
1019
1020 @itemize @bullet
1021 @item
1022 A vector, specifying values for characters starting at 0.
1023 @item
1024 A char table, either of type @code{char} or @code{generic}.
1025 @item
1026 A range table.
1027 @end itemize
1028
1029 Each entry in a display table should be one of
1030
1031 @itemize @bullet
1032 @item
1033 nil (this entry is ignored and the search continues).
1034 @item
1035 A character (use this character; if it happens to be the same as
1036 the original character, default processing happens, otherwise
1037 redisplay attempts to display this character directly;
1038 #### At some point recursive display-table lookup will be
1039 implemented).
1040 @item
1041 A string (display each character in the string directly;
1042 #### At some point recursive display-table lookup will be
1043 implemented).
1044 @item
1045 A glyph (display the glyph;
1046 #### At some point recursive display-table lookup will be
1047 implemented when a string glyph is being processed).
1048 @item
1049 A cons of the form (format "@var{string}") where @var{string} is a
1050 printf-like spec used to process the character. #### Unfortunately no
1051 formatting directives other than %% are implemented.
1052 @item
1053 A vector (each element of the vector is processed recursively;
1054 in such a case, nil elements in the vector are simply ignored).
1055
1056 #### At some point in the near future, display tables are likely to
1057 be expanded to include other features, such as referencing characters
1058 in particular fonts and allowing the character search to continue
1059 all the way up the chain of specifier instantiators. These features
1060 are necessary to properly display Unicode characters.
1061 @end itemize
1062 @end defvar
998 1063
999 Individual faces can also specify an overriding display table; 1064 Individual faces can also specify an overriding display table;
1000 this is set using @code{set-face-display-table}. @xref{Faces}. 1065 this is set using @code{set-face-display-table}. @xref{Faces}.
1001 1066
1002 If no display table can be determined for a particular window, 1067 If no display table can be determined for a particular window,