Function: quail-get-current-str

quail-get-current-str is a byte-compiled function defined in quail.el.gz.

Signature

(quail-get-current-str LEN DEF)

Documentation

Return string to be shown as current translation of key sequence.

LEN is the length of the sequence. DEF is a definition part of the Quail map for the sequence.

Source Code

;; Defined in /usr/src/emacs/lisp/international/quail.el.gz
(defun quail-get-current-str (len def)
  "Return string to be shown as current translation of key sequence.
LEN is the length of the sequence.  DEF is a definition part of the
Quail map for the sequence."
  (or (and (consp def)
	   (if (> (length (cdr def)) (car (car def)))
	       (aref (cdr def) (car (car def)))
	     ""))
      def
      (and (> len 1)
	   (let* ((str (quail-get-current-str
			(1- len)
			(quail-map-definition (quail-lookup-key
					       quail-current-key (1- len)))))
		  (substr1 (substring quail-current-key (1- len) len))
		  (str1 (and (quail-deterministic)
			     (quail-get-current-str
			      1
			      (quail-map-definition (quail-lookup-key
						     substr1 1))))))
	     (if str
		 (concat (if (stringp str) str (char-to-string str))
			 (if str1
			     (if (stringp str1) str1 (char-to-string str1))
			   substr1)))))))