Function: quail-input-method
quail-input-method is a byte-compiled function defined in quail.el.gz.
Signature
(quail-input-method KEY)
Source Code
;; Defined in /usr/src/emacs/lisp/international/quail.el.gz
(defun quail-input-method (key)
(if (or (and (or buffer-read-only
(and (get-char-property (point) 'read-only)
(get-char-property (point) 'front-sticky)))
(not (or inhibit-read-only
(get-char-property (point) 'inhibit-read-only))))
(and overriding-terminal-local-map
;; If the overriding map is `universal-argument-map', that
;; must mean the user has pressed 'C-u KEY'. If KEY has a
;; binding in `universal-argument-map' just return
;; (list KEY), otherwise act as if there was no
;; overriding map.
;; We used to do that only for `universal-argument-map',
;; but according to bug#68338 this should also apply to
;; other transient maps. Let's hope it's OK to apply it
;; to all `overriding-terminal-local-map's.
(lookup-key overriding-terminal-local-map (vector key)))
overriding-local-map)
(list key)
(quail-setup-overlays (quail-conversion-keymap))
(with-silent-modifications
(unwind-protect
(let* (;; `with-silent-modifications' inhibits the modification
;; hooks, but that's a part of `with-silent-modifications'
;; we don't actually want here (bug#70541).
(inhibit-modification-hooks nil)
(input-string (if (quail-conversion-keymap)
(quail-start-conversion key)
(quail-start-translation key))))
(setq quail-guidance-str "")
(when (and (stringp input-string)
(> (length input-string) 0))
(if input-method-exit-on-first-char
(list (aref input-string 0))
(quail-input-string-to-events input-string))))
(quail-delete-overlays)
;; Run this hook only when the current input method doesn't require
;; conversion. When conversion is required, the conversion function
;; should run this hook at a proper timing.
(unless (quail-conversion-keymap)
(run-hooks 'input-method-after-insert-chunk-hook))))))