]> git.eshelyaron.com Git - emacs.git/commitdiff
quail/japanese.el (quail-japanese-update-translation): Fix handling of invalid key.
authorKenichi Handa <handa@m17n.org>
Sat, 28 Aug 2010 06:03:00 +0000 (15:03 +0900)
committerKenichi Handa <handa@m17n.org>
Sat, 28 Aug 2010 06:03:00 +0000 (15:03 +0900)
1  2 
leim/ChangeLog
leim/quail/japanese.el

diff --cc leim/ChangeLog
index dd33ae5a32f74ecda57926118673d5d9bca433c7,dd33ae5a32f74ecda57926118673d5d9bca433c7..9c5b2374b1fb9fe852e036dd1933246ed7d1e42e
@@@ -1,3 -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.
index e1f7e74e0306e6d3f2b93827e40e0458dca65abe,e1f7e74e0306e6d3f2b93827e40e0458dca65abe..42d83c6b8063dfc2ea3bcdeb99aca32c9683742e
                (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 ?\e$B$s\e(B)
                 (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 ?\e$B$C\e(B))
                (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.