Function: quail-map-p

quail-map-p is a byte-compiled function defined in quail.el.gz.

Signature

(quail-map-p OBJECT)

Documentation

Return t if OBJECT is a Quail map.

A Quail map holds information how a particular key should be translated. Its format is (TRANSLATION . ALIST). TRANSLATION is either a character, or a cons (INDEX . VECTOR). In the latter case, each element of VECTOR is a candidate for the translation, and INDEX points the currently selected translation.

ALIST is normally a list of elements that look like (CHAR . DEFN), where DEFN is another Quail map for a longer key (CHAR added to the current key). It may also be a symbol of a function which returns an alist of the above format.

Just after a Quail package is read, TRANSLATION may be a string or a vector. Then each element of the string or vector is a candidate for the translation. These objects are transformed to cons cells in the format (INDEX . VECTOR), as described above.

Source Code

;; Defined in /usr/src/emacs/lisp/international/quail.el.gz
;; Quail map

(defsubst quail-map-p (object)
  "Return t if OBJECT is a Quail map.

A Quail map holds information how a particular key should be translated.
Its format is (TRANSLATION . ALIST).
TRANSLATION is either a character, or a cons (INDEX . VECTOR).
In the latter case, each element of VECTOR is a candidate for the translation,
and INDEX points the currently selected translation.

ALIST is normally a list of elements that look like (CHAR . DEFN),
where DEFN is another Quail map for a longer key (CHAR added to the
current key).  It may also be a symbol of a function which returns an
alist of the above format.

Just after a Quail package is read, TRANSLATION may be a string or a
vector.  Then each element of the string or vector is a candidate for
the translation.  These objects are transformed to cons cells in the
format \(INDEX . VECTOR), as described above."
  (and (consp object)
       (let ((translation (car object)))
	 (or (integerp translation) (null translation)
	     (vectorp translation) (stringp translation)
	     (symbolp translation)
	     (and (consp translation) (not (vectorp (cdr translation))))))
       (let ((alist (cdr object)))
	 (or (and (listp alist) (consp (car alist)))
	     (symbolp alist)))))