From: Kenichi Handa Date: Tue, 21 Nov 2006 01:10:33 +0000 (+0000) Subject: (quail-insert-kbd-layout): Check the X-Git-Tag: emacs-pretest-23.0.90~8295^2~686 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6b829ee1e3124d4508d9dfb8bd2183243fc909eb;p=emacs.git (quail-insert-kbd-layout): Check the length of (cdr translation). (quail-get-current-str): Check the length of (cdr def). --- diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 75de3e1f271..17dd5013805 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -798,7 +798,9 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'." (if translation (progn (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))) + "")) def (and (> len 1) (let* ((str (quail-get-current-str