diff options
| author | Kenichi Handa | 2006-11-21 01:10:33 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-11-21 01:10:33 +0000 |
| commit | 6b829ee1e3124d4508d9dfb8bd2183243fc909eb (patch) | |
| tree | 44e0edca8961914420484f527af1ea88271c01d1 | |
| parent | db8ab0f587fa7b012fb25dfff53e1a57ea25c98d (diff) | |
| download | emacs-6b829ee1e3124d4508d9dfb8bd2183243fc909eb.tar.gz emacs-6b829ee1e3124d4508d9dfb8bd2183243fc909eb.zip | |
(quail-insert-kbd-layout): Check the
length of (cdr translation).
(quail-get-current-str): Check the length of (cdr def).
| -rw-r--r-- | lisp/international/quail.el | 9 |
1 files changed, 7 insertions, 2 deletions
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'." | |||
| 798 | (if translation | 798 | (if translation |
| 799 | (progn | 799 | (progn |
| 800 | (if (consp translation) | 800 | (if (consp translation) |
| 801 | (setq translation (aref (cdr translation) 0))) | 801 | (if (> (length (cdr translation)) 0) |
| 802 | (setq translation (aref (cdr translation) 0)) | ||
| 803 | (setq translation " "))) | ||
| 802 | (setq done-list (cons translation done-list))) | 804 | (setq done-list (cons translation done-list))) |
| 803 | (setq translation ch)) | 805 | (setq translation ch)) |
| 804 | (aset layout i translation)) | 806 | (aset layout i translation)) |
| @@ -1583,7 +1585,10 @@ with more keys." | |||
| 1583 | "Return string to be shown as current translation of key sequence. | 1585 | "Return string to be shown as current translation of key sequence. |
| 1584 | LEN is the length of the sequence. DEF is a definition part of the | 1586 | LEN is the length of the sequence. DEF is a definition part of the |
| 1585 | Quail map for the sequence." | 1587 | Quail map for the sequence." |
| 1586 | (or (and (consp def) (aref (cdr def) (car (car def)))) | 1588 | (or (and (consp def) |
| 1589 | (if (> (length (cdr def)) (car (car def))) | ||
| 1590 | (aref (cdr def) (car (car def))) | ||
| 1591 | "")) | ||
| 1587 | def | 1592 | def |
| 1588 | (and (> len 1) | 1593 | (and (> len 1) |
| 1589 | (let* ((str (quail-get-current-str | 1594 | (let* ((str (quail-get-current-str |