Commit 6b829ee1 authored by Kenichi Handa's avatar Kenichi Handa

(quail-insert-kbd-layout): Check the

length of (cdr translation).
(quail-get-current-str): Check the length of (cdr def).
parent db8ab0f5
......@@ -798,7 +798,9 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'."
(if translation
(if (consp translation)
(setq translation (aref (cdr translation) 0)))
(if (> (length (cdr translation)) 0)
(setq translation (aref (cdr translation) 0))
(setq translation " ")))
(setq done-list (cons translation done-list)))
(setq translation ch))
(aset layout i translation))
......@@ -1583,7 +1585,10 @@ with more keys."
"Return string to be shown as current translation of key sequence.
LEN is the length of the sequence. DEF is a definition part of the
Quail map for the sequence."
(or (and (consp def) (aref (cdr def) (car (car def))))
(or (and (consp def)
(if (> (length (cdr def)) (car (car def)))
(aref (cdr def) (car (car def)))
(and (> len 1)
(let* ((str (quail-get-current-str
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment