diff options
| author | Kenichi Handa | 1998-09-22 10:33:09 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-09-22 10:33:09 +0000 |
| commit | bd21f930c936043a9b6f1ebcdadce0a22ca7a62d (patch) | |
| tree | da20a365a136e920435f8340e6570ac30f52f74a | |
| parent | 519bf1461a882f40fa8e4e12cb161e1ffbde4b8b (diff) | |
| download | emacs-bd21f930c936043a9b6f1ebcdadce0a22ca7a62d.tar.gz emacs-bd21f930c936043a9b6f1ebcdadce0a22ca7a62d.zip | |
(quail-update-guidance): Check for the
return value of (quail-guidance) fixed.
(quail-update-translation): Bind quail-current-str locally when it
calls quail-update-guidance.
(quail-update-translation): If input-method-exit-on-first-char is
non-nil, terminate translation only when the current input method
is simple.
| -rw-r--r-- | lisp/international/quail.el | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index c06a16ff7ae..f003e1e73d9 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -1066,25 +1066,29 @@ The returned value is a Quail map specific to KEY." | |||
| 1066 | (if (= len 1) | 1066 | (if (= len 1) |
| 1067 | (setq control-flag t | 1067 | (setq control-flag t |
| 1068 | quail-current-str quail-current-key) | 1068 | quail-current-str quail-current-key) |
| 1069 | (while (> len control-flag) | 1069 | (if input-method-exit-on-first-char |
| 1070 | (setq len (1- len)) | 1070 | (setq len control-flag) |
| 1071 | (setq unread-command-events | 1071 | (while (> len control-flag) |
| 1072 | (cons (aref quail-current-key len) | 1072 | (setq len (1- len)) |
| 1073 | unread-command-events))) | 1073 | (setq unread-command-events |
| 1074 | (cons (aref quail-current-key len) | ||
| 1075 | unread-command-events)))) | ||
| 1074 | (if quail-current-str | 1076 | (if quail-current-str |
| 1075 | (if input-method-exit-on-first-char | 1077 | (if input-method-exit-on-first-char |
| 1076 | (setq control-flag t)) | 1078 | (setq control-flag t)) |
| 1077 | (setq quail-current-str | 1079 | (setq quail-current-str |
| 1078 | (substring quail-current-key 0 len))))) | 1080 | (substring quail-current-key 0 len))))) |
| 1079 | (if quail-current-str | 1081 | (if quail-current-str |
| 1080 | (if input-method-exit-on-first-char | 1082 | (if (and input-method-exit-on-first-char |
| 1083 | (quail-simple)) | ||
| 1081 | (setq control-flag t)) | 1084 | (setq control-flag t)) |
| 1082 | (setq quail-current-str quail-current-key)))) | 1085 | (setq quail-current-str quail-current-key))))) |
| 1083 | (if (not input-method-use-echo-area) | 1086 | (or input-method-use-echo-area |
| 1084 | (progn | 1087 | (progn |
| 1085 | (quail-delete-region) | 1088 | (quail-delete-region) |
| 1086 | (insert quail-current-str)))) | 1089 | (insert quail-current-str))) |
| 1087 | (quail-update-guidance) | 1090 | (let (quail-current-str) |
| 1091 | (quail-update-guidance)) | ||
| 1088 | (or (stringp quail-current-str) | 1092 | (or (stringp quail-current-str) |
| 1089 | (setq quail-current-str (char-to-string quail-current-str))) | 1093 | (setq quail-current-str (char-to-string quail-current-str))) |
| 1090 | (if control-flag | 1094 | (if control-flag |
| @@ -1516,7 +1520,7 @@ or in a newly created frame (if the selected frame has no other windows)." | |||
| 1516 | (if (quail-require-guidance-buf) | 1520 | (if (quail-require-guidance-buf) |
| 1517 | (let ((guidance (quail-guidance))) | 1521 | (let ((guidance (quail-guidance))) |
| 1518 | (cond ((or (eq guidance t) | 1522 | (cond ((or (eq guidance t) |
| 1519 | (listp guidance)) | 1523 | (consp guidance)) |
| 1520 | ;; Show the current possible translations. | 1524 | ;; Show the current possible translations. |
| 1521 | (quail-show-translations)) | 1525 | (quail-show-translations)) |
| 1522 | ((null guidance) | 1526 | ((null guidance) |