# HG changeset patch # User Kenichi Handa # Date 1164071433 0 # Node ID 38ad9fa1876bd7b54511b5c01de3b4a56ce53d5b # Parent aa6d1499ee0aeedbab35f6ffa50ea6a12e4d3d7b (quail-insert-kbd-layout): Check the length of (cdr translation). (quail-get-current-str): Check the length of (cdr def). diff -r aa6d1499ee0a -r 38ad9fa1876b lisp/international/quail.el --- a/lisp/international/quail.el Mon Nov 20 12:10:54 2006 +0000 +++ b/lisp/international/quail.el Tue Nov 21 01:10:33 2006 +0000 @@ -798,7 +798,9 @@ (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 @@ "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