diff options
| -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 |