diff options
| author | Richard M. Stallman | 1997-09-04 04:47:34 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-09-04 04:47:34 +0000 |
| commit | e41b451795bca8164ddcaae19d915f798e118590 (patch) | |
| tree | adb672e3f4a35846d01dd8e6fba00f51598449db | |
| parent | 1b2af4b0badae7bad8130d27b22a325c6a58d50b (diff) | |
| download | emacs-e41b451795bca8164ddcaae19d915f798e118590.tar.gz emacs-e41b451795bca8164ddcaae19d915f798e118590.zip | |
(quail-update-translation):
Do insert translated char when enable-multibyte-characters is nil.
| -rw-r--r-- | lisp/international/quail.el | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index df5f009988d..77e69b04d6a 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -1062,8 +1062,21 @@ The returned value is a Quail map specific to KEY." | |||
| 1062 | (setq unread-command-events | 1062 | (setq unread-command-events |
| 1063 | (cons (aref quail-current-key len) | 1063 | (cons (aref quail-current-key len) |
| 1064 | unread-command-events))) | 1064 | unread-command-events))) |
| 1065 | (insert (or quail-current-str | 1065 | ;; Insert the translated sequence. |
| 1066 | (substring quail-current-key 0 len)))) | 1066 | ;; It is a string containing multibyte characters. |
| 1067 | ;; If enable-multibyte-characters, just insert it. | ||
| 1068 | (if enable-multibyte-characters | ||
| 1069 | (insert (or quail-current-str | ||
| 1070 | (substring quail-current-key 0 len))) | ||
| 1071 | ;; Otherwise, in case the user is using a single-byte | ||
| 1072 | ;; extended-ASCII character set, | ||
| 1073 | ;; try inserting the translated character. | ||
| 1074 | (let ((char (sref (or quail-current-str | ||
| 1075 | (substring quail-current-key 0 len)) | ||
| 1076 | 0))) | ||
| 1077 | (if (= (length (split-char char)) 2) | ||
| 1078 | (insert-char (logand char 127)) | ||
| 1079 | (error "Cannot insert three-byte character in single-byte mode"))))) | ||
| 1067 | (insert (or quail-current-str quail-current-key))))) | 1080 | (insert (or quail-current-str quail-current-key))))) |
| 1068 | (quail-update-guidance) | 1081 | (quail-update-guidance) |
| 1069 | (if control-flag | 1082 | (if control-flag |