diff options
| author | Kenichi Handa | 2010-08-28 15:03:00 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-08-28 15:03:00 +0900 |
| commit | f2b38ae6dd11ffd2778441afff616045b952d3cd (patch) | |
| tree | 2bbb18e0e6673e34087e0c0c3b0c3aad2b1d0e0c | |
| parent | 217876c9b0db6c61f3607f3083b8533dd5c3fcc1 (diff) | |
| parent | 9027027d085973006891374fdc337334a5db7b5b (diff) | |
| download | emacs-f2b38ae6dd11ffd2778441afff616045b952d3cd.tar.gz emacs-f2b38ae6dd11ffd2778441afff616045b952d3cd.zip | |
quail/japanese.el (quail-japanese-update-translation): Fix handling of invalid key.
| -rw-r--r-- | leim/ChangeLog | 5 | ||||
| -rw-r--r-- | leim/quail/japanese.el | 15 |
2 files changed, 15 insertions, 5 deletions
diff --git a/leim/ChangeLog b/leim/ChangeLog index dd33ae5a32f..9c5b2374b1f 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-08-28 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * quail/japanese.el (quail-japanese-update-translation): Fix | ||
| 4 | handling of invalid key. | ||
| 5 | |||
| 1 | 2010-08-15 Andreas Schwab <schwab@linux-m68k.org> | 6 | 2010-08-15 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 7 | ||
| 3 | * quail/vntelex.el ("vietnamese-telex"): Doc fix. | 8 | * quail/vntelex.el ("vietnamese-telex"): Doc fix. |
diff --git a/leim/quail/japanese.el b/leim/quail/japanese.el index e1f7e74e030..42d83c6b806 100644 --- a/leim/quail/japanese.el +++ b/leim/quail/japanese.el | |||
| @@ -43,20 +43,25 @@ | |||
| 43 | (or quail-current-str quail-current-key) | 43 | (or quail-current-str quail-current-key) |
| 44 | "")) | 44 | "")) |
| 45 | (if (integerp control-flag) | 45 | (if (integerp control-flag) |
| 46 | (if (= control-flag 0) | 46 | (let ((keylen (length quail-current-key))) |
| 47 | (setq quail-current-str (aref quail-current-key 0)) | 47 | (cond ((= control-flag 0) |
| 48 | (cond ((= (aref quail-current-key 0) ?n) | 48 | (setq quail-current-str (aref quail-current-key 0) |
| 49 | control-flag t)) | ||
| 50 | ((= (aref quail-current-key 0) ?n) | ||
| 49 | (setq quail-current-str ?ん) | 51 | (setq quail-current-str ?ん) |
| 50 | (if (and quail-japanese-use-double-n | 52 | (if (and quail-japanese-use-double-n |
| 53 | (> keylen 0) | ||
| 51 | (= (aref quail-current-key 1) ?n)) | 54 | (= (aref quail-current-key 1) ?n)) |
| 52 | (setq control-flag t))) | 55 | (setq control-flag t))) |
| 53 | ((= (aref quail-current-key 0) (aref quail-current-key 1)) | 56 | ((and (> keylen 1) |
| 57 | (= (aref quail-current-key 0) (aref quail-current-key 1))) | ||
| 54 | (setq quail-current-str ?っ)) | 58 | (setq quail-current-str ?っ)) |
| 55 | (t | 59 | (t |
| 56 | (setq quail-current-str (aref quail-current-key 0)))) | 60 | (setq quail-current-str (aref quail-current-key 0)))) |
| 57 | (if (integerp control-flag) | 61 | (if (integerp control-flag) |
| 58 | (setq unread-command-events | 62 | (setq unread-command-events |
| 59 | (list (aref quail-current-key control-flag))))))) | 63 | (string-to-list |
| 64 | (substring quail-current-key control-flag))))))) | ||
| 60 | control-flag) | 65 | control-flag) |
| 61 | 66 | ||
| 62 | ;; Convert Hiragana <-> Katakana in the current translation region. | 67 | ;; Convert Hiragana <-> Katakana in the current translation region. |