# HG changeset patch # User Kenichi Handa # Date 1282994780 -32400 # Node ID 9e82fd2cdf71ca8a1f0a2c905c42502ef0c60b2c # Parent 6252a1df11106f4a66583825704ff8ba193cbe2d# Parent 9fc1e3c180d3b20b02ebfea4543e644f10128f10 merge emacs-23 diff -r 6252a1df1110 -r 9e82fd2cdf71 leim/ChangeLog --- a/leim/ChangeLog Fri Aug 27 23:06:02 2010 +0900 +++ b/leim/ChangeLog Sat Aug 28 20:26:20 2010 +0900 @@ -1,3 +1,8 @@ +2010-08-28 Kenichi Handa + + * quail/japanese.el (quail-japanese-update-translation): Fix + handling of invalid key. + 2010-08-15 Andreas Schwab * quail/vntelex.el ("vietnamese-telex"): Doc fix. diff -r 6252a1df1110 -r 9e82fd2cdf71 leim/quail/japanese.el --- a/leim/quail/japanese.el Fri Aug 27 23:06:02 2010 +0900 +++ b/leim/quail/japanese.el Sat Aug 28 20:26:20 2010 +0900 @@ -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.