quail-defrule

quail-defrule is an autoloaded Lisp function in `quail.el'.

(quail-defrule KEY TRANSLATION &optional NAME APPEND)

Add one translation rule, KEY to TRANSLATION, in the current Quail package.
KEY is a string meaning a sequence of keystrokes to be translated.
TRANSLATION is a character, a string, a vector, a Quail map,
a function, or a cons.
It it is a character, it is the sole translation of KEY.
If it is a string, each character is a candidate for the translation.
If it is a vector, each element (string or character) is a candidate
for the translation.
If it is a cons, the car is one of the above and the cdr is a function
to call when translating KEY (the return value is assigned to the
variable `quail-current-data'). If the cdr part is not a function,
the value itself is assigned to `quail-current-data'.
In these cases, a key specific Quail map is generated and assigned to KEY.

If TRANSLATION is a Quail map or a function symbol which returns a Quail map,
it is used to handle KEY.

Optional 3rd argument NAME, if specified, says which Quail package
to define this translation rule in. The default is to define it in the
current Quail package.

Optional 4th argument APPEND, if non-nil, appends TRANSLATION
to the current translations for KEY instead of replacing them.