Mercurial > emacs
changeset 19327:70e5d1211d98
(quail-start-translation): Use an explicit loop, not recursive edit.
(quail-suppress-conversion): Doc fix.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 13 Aug 1997 00:26:42 +0000 |
parents | 14681d10a973 |
children | a616b45ffa31 |
files | lisp/international/quail.el |
diffstat | 1 files changed, 28 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/quail.el Tue Aug 12 23:18:41 1997 +0000 +++ b/lisp/international/quail.el Wed Aug 13 00:26:42 1997 +0000 @@ -898,7 +898,16 @@ (throw 'exit nil))) (defvar quail-suppress-conversion nil - "If non-nil, suppress converting facility of the current Quail package.") + "If non-nil, suppress conversion facility of the current Quail package. +We distinguish between \"translation\" and \"conversion\" aspects +of an input method. Translation is the first step, done by Quail itself; +conversion is the second step which changes the translated text into +bettertext. For instance, the Quail package for Japanese (`quail-jp') +translates Roman text (transliteration of Japanese in Latin alphabets) +to Hiragana text, and then converts the Hiragana into Kanji-and-Kana +mixed text or Katakana text. + +If this variable is non-nil, translation still occurs, but not conversion.") ;; If set to non-nil, exit conversion mode before starting new translation. (defvar quail-exit-conversion-mode nil) @@ -921,15 +930,27 @@ (if (and (not quail-suppress-conversion) (quail-conversion-keymap)) ;; We must start translation in conversion mode. - (let ((overriding-local-map (quail-conversion-keymap))) + (let ((overriding-terminal-local-map (quail-conversion-keymap))) (setq quail-exit-conversion-mode nil) - (recursive-edit) + (catch 'exit + (while t + (let* ((key (read-key-sequence nil)) + (definition (lookup-key overriding-terminal-local-map key t))) + (setq last-command-event (aref key 0)) + (setq prefix-arg nil) + (if definition (call-interactively definition))))) (if (and auto-fill-function (> (current-column) (current-fill-column))) (run-hooks 'auto-fill-function))) - (let ((overriding-local-map (quail-translation-keymap))) + (let ((overriding-terminal-local-map (quail-translation-keymap))) (setq quail-current-key "") - (recursive-edit))) + (catch 'exit + (while t + (let* ((key (read-key-sequence nil)) + (definition (lookup-key overriding-terminal-local-map key t))) + (setq last-command-event (aref key 0)) + (setq prefix-arg nil) + (if definition (call-interactively definition))))))) (if (prog1 (< (overlay-start quail-conv-overlay) (overlay-end quail-conv-overlay)) (delete-overlay quail-conv-overlay)) @@ -937,7 +958,8 @@ nil) ;; Someone has thrown a tag with value t, which means ;; we should turn Quail mode off. - (quail-mode -1))) + (quail-mode -1)) + (message "")) ;; Since the typed character doesn't start any translation, handle ;; it out of Quail mode. We come back to Quail mode later because ;; function `quail-toggle-mode-temporarily' is in