Mercurial > emacs
comparison lisp/international/quail.el @ 90690:9a11c329a57b
(quail-get-translations): Make
quail-current-key multibyte if not yet done.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 28 Nov 2006 05:34:38 +0000 |
parents | 38ad9fa1876b |
children | 6588c6259dfb |
comparison
equal
deleted
inserted
replaced
90689:5c03e223d11b | 90690:9a11c329a57b |
---|---|
2064 (set-window-start win pos)) | 2064 (set-window-start win pos)) |
2065 )))))) | 2065 )))))) |
2066 | 2066 |
2067 (defun quail-get-translations () | 2067 (defun quail-get-translations () |
2068 "Return a string containing the current possible translations." | 2068 "Return a string containing the current possible translations." |
2069 (or (multibyte-string-p quail-current-key) | |
2070 (setq quail-current-key (string-to-multibyte quail-current-key))) | |
2069 (let ((map (quail-lookup-key quail-current-key nil t)) | 2071 (let ((map (quail-lookup-key quail-current-key nil t)) |
2070 (str (copy-sequence quail-current-key))) | 2072 (str (copy-sequence quail-current-key))) |
2071 (if quail-current-translations | 2073 (if quail-current-translations |
2072 (quail-update-current-translations)) | 2074 (quail-update-current-translations)) |
2073 | 2075 |
2074 ;; Show the current key. | 2076 ;; Show the current key. |
2075 (let ((guidance (quail-guidance))) | 2077 (let ((guidance (quail-guidance))) |
2076 (if (listp guidance) | 2078 (if (listp guidance) |
2077 ;; We must replace thetyped key with the specified PROMPTKEY. | 2079 ;; We must replace the typed key with the specified PROMPT-KEY. |
2078 (dotimes (i (length str)) | 2080 (dotimes (i (length str)) |
2079 (let ((prompt-key (cdr (assoc (aref str i) guidance)))) | 2081 (let ((prompt-key (cdr (assoc (aref str i) guidance)))) |
2080 (if prompt-key | 2082 (if prompt-key |
2081 (aset str i (aref prompt-key 0))))))) | 2083 (aset str i (aref prompt-key 0))))))) |
2082 | 2084 |