Variable: buffer-display-table

buffer-display-table is a buffer-local variable defined in buffer.c.

Documentation

Display table that controls display of the contents of current buffer.

If this variable is nil, the value of standard-display-table is used. Each window can have its own, overriding display table, see set-window-display-table and window-display-table.

The display table is a char-table created with make-display-table. A char-table is an array indexed by character codes. Normal array primitives aref and aset can be used to access elements of a char-table.

Each of the char-table elements control how to display the corresponding text character: the element at index C in the table says how to display the character whose code is C. Each element should be a vector of characters or nil. The value nil means display the character in the default fashion; otherwise, the characters from the vector are delivered to the screen instead of the original character.

For example, (aset buffer-display-table ?X [?Y]) tells Emacs to display a capital Y instead of each X character.

In addition, a char-table has six extra slots to control the display of:

  the end of a truncated screen line (extra-slot 0, a single character);
  the end of a continued line (extra-slot 1, a single character);
  the escape character used to display character codes in octal
    (extra-slot 2, a single character);
  the character used as an arrow for control characters (extra-slot 3,
    a single character);
  the decoration indicating the presence of invisible lines (extra-slot 4,
    a vector of characters);
  the character used to draw the border between side-by-side windows
    (extra-slot 5, a single character).

See also the functions display-table-slot and set-display-table-slot.

Source Code

// Defined in /usr/src/emacs/src/buffer.c
  DEFVAR_PER_BUFFER ("buffer-display-table", &BVAR (current_buffer, display_table),
		     Qnil,
		     doc: /* Display table that controls display of the contents of current buffer.

If this variable is nil, the value of `standard-display-table' is used.
Each window can have its own, overriding display table, see
`set-window-display-table' and `window-display-table'.

The display table is a char-table created with `make-display-table'.
A char-table is an array indexed by character codes.  Normal array
primitives `aref' and `aset' can be used to access elements of a char-table.

Each of the char-table elements control how to display the corresponding
text character: the element at index C in the table says how to display
the character whose code is C.  Each element should be a vector of
characters or nil.  The value nil means display the character in the
default fashion; otherwise, the characters from the vector are delivered
to the screen instead of the original character.

For example, (aset buffer-display-table ?X [?Y]) tells Emacs
to display a capital Y instead of each X character.

In addition, a char-table has six extra slots to control the display of:

  the end of a truncated screen line (extra-slot 0, a single character);
  the end of a continued line (extra-slot 1, a single character);
  the escape character used to display character codes in octal
    (extra-slot 2, a single character);
  the character used as an arrow for control characters (extra-slot 3,
    a single character);
  the decoration indicating the presence of invisible lines (extra-slot 4,
    a vector of characters);
  the character used to draw the border between side-by-side windows
    (extra-slot 5, a single character).

See also the functions `display-table-slot' and `set-display-table-slot'.  */);