日本語入力のときはkey-chordをoffにする

最近kaとかwaとかうまく入力できないなーと思ったので、日本語入力モードのときはkey-chordをoffってみたす。
d:id:grandVin:20080917:1221653750 を参考にしつつ。

(require 'key-chord nil t)
(if (featurep 'key-chord)
    (progn
      (defadvice toggle-input-method
        (around toggle-input-method-around activate)
        (let ((input-method-function-save input-method-function))
          ad-do-it
          (setq input-method-function input-method-function-save)
          (key-chord-mode (if current-input-method 0 1))))

      (setq key-chord-two-keys-delay 0.1)
      (key-chord-mode 1)
      (key-chord-define-global "jk" 'view-mode)
      (key-chord-define-global "cw" 'kill-word)
      ))