PREV UP NEXT GNU Emacs Lisp Reference Manual

35.13: Usual Display Conventions

The usual display conventions define how to display each character code. You can override these conventions by setting up a display table (see Display Tables). Here are the usual display conventions:

  • Character codes 32 through 126 map to glyph codes 32 through 126. Normally this means they display as themselves.
  • Character code 9 is a horizontal tab. It displays as whitespace up to a position determined by tab-width.
  • Character code 10 is a newline.
  • All other codes in the range 0 through 31, and code 127, display in one of two ways according to the value of ctl-arrow. If it is non-nil, these codes map to sequences of two glyphs, where the first glyph is the ASCII code for `^'. (A display table can specify a glyph to use instead of `^'.) Otherwise, these codes map just like the codes in the range 128 to 255.
  • Character codes 128 through 255 map to sequences of four glyphs, where the first glyph is the ASCII code for `\', and the others are digit characters representing the code in octal. (A display table can specify a glyph to use instead of `\'.)

The usual display conventions apply even when there is a display table, for any character whose entry in the active display table is nil. Thus, when you set up a display table, you need only specify the characters for which you want unusual behavior.

These variables affect the way certain characters are displayed on the screen. Since they change the number of columns the characters occupy, they also affect the indentation functions.

User Option: ctl-arrow
This buffer-local variable controls how control characters are displayed. If it is non-nil, they are displayed as a caret followed by the character: `^A'. If it is nil, they are displayed as a backslash followed by three octal digits: `\001'.
Variable: default-ctl-arrow
The value of this variable is the default value for ctl-arrow in buffers that do not override it. See Default Value.
User Option: tab-width
The value of this variable is the spacing between tab stops used for displaying tab characters in Emacs buffers. The default is 8. Note that this feature is completely independent from the user-settable tab stops used by the command tab-to-tab-stop. See Indent Tabs.