Variable: auto-composition-function

auto-composition-function is a buffer-local variable defined in composite.c.

Documentation

Function to call to compose characters automatically.

This function is called from the display engine with 6 arguments: FUNC, FROM, TO, FONT-OBJECT, STRING, and DIRECTION.

FUNC is the function to compose characters. On text-mode display, FUNC is ignored and compose-gstring-for-terminal is used instead.

If STRING is nil, the function must compose characters in the region between FROM and TO in the current buffer.

Otherwise, STRING is a string, and FROM and TO are indices into the string. In this case, the function must compose characters in the string.

FONT-OBJECT is the font to use, or nil if characters are to be composed on a text-mode display.

DIRECTION is the bidi directionality of the text to shape. It could be L2R or R2L, or nil if unknown.

Probably introduced at or before Emacs version 23.1.

Source Code

// Defined in /usr/src/emacs/src/composite.c
  DEFVAR_LISP ("auto-composition-function", Vauto_composition_function,
	       doc: /* Function to call to compose characters automatically.
This function is called from the display engine with 6 arguments:
FUNC, FROM, TO, FONT-OBJECT, STRING, and DIRECTION.

FUNC is the function to compose characters.  On text-mode display,
FUNC is ignored and `compose-gstring-for-terminal' is used instead.

If STRING is nil, the function must compose characters in the region
between FROM and TO in the current buffer.

Otherwise, STRING is a string, and FROM and TO are indices into the
string.  In this case, the function must compose characters in the
string.

FONT-OBJECT is the font to use, or nil if characters are to be
composed on a text-mode display.

DIRECTION is the bidi directionality of the text to shape.  It could
be L2R or R2L, or nil if unknown.  */);