diff options
author | Kenichi Handa <handa@m17n.org> | 2010-08-28 15:03:00 +0900 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2010-08-28 15:03:00 +0900 |
commit | f2b38ae6dd11ffd2778441afff616045b952d3cd (patch) | |
tree | 2bbb18e0e6673e34087e0c0c3b0c3aad2b1d0e0c /leim | |
parent | 217876c9b0db6c61f3607f3083b8533dd5c3fcc1 (diff) | |
parent | 9027027d085973006891374fdc337334a5db7b5b (diff) | |
download | emacs-f2b38ae6dd11ffd2778441afff616045b952d3cd.tar.gz |
quail/japanese.el (quail-japanese-update-translation): Fix handling of invalid key.
Diffstat (limited to 'leim')
-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 @@ +2010-08-28 Kenichi Handa <handa@m17n.org> + + * quail/japanese.el (quail-japanese-update-translation): Fix + handling of invalid key. + 2010-08-15 Andreas Schwab <schwab@linux-m68k.org> * 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 @@ (or quail-current-str quail-current-key) "")) (if (integerp control-flag) - (if (= control-flag 0) - (setq quail-current-str (aref quail-current-key 0)) - (cond ((= (aref quail-current-key 0) ?n) + (let ((keylen (length quail-current-key))) + (cond ((= control-flag 0) + (setq quail-current-str (aref quail-current-key 0) + control-flag t)) + ((= (aref quail-current-key 0) ?n) (setq quail-current-str ?ん) (if (and quail-japanese-use-double-n + (> keylen 0) (= (aref quail-current-key 1) ?n)) (setq control-flag t))) - ((= (aref quail-current-key 0) (aref quail-current-key 1)) + ((and (> keylen 1) + (= (aref quail-current-key 0) (aref quail-current-key 1))) (setq quail-current-str ?っ)) (t (setq quail-current-str (aref quail-current-key 0)))) (if (integerp control-flag) (setq unread-command-events - (list (aref quail-current-key control-flag))))))) + (string-to-list + (substring quail-current-key control-flag))))))) control-flag) ;; Convert Hiragana <-> Katakana in the current translation region. |