vine-default-ibus-el.el 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;; -*- coding: utf-8-unix -*-
  3. ;; FSF Emacs 23 用 Vine Linux ibus-el 設定
  4. ;; IWAI, Masaharu <iwai@alib.jp>
  5. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  6. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  7. ;; ibus-el の設定
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  9. (if (or (equal emacs-ime "ibus-el")
  10. (equal emacs-ime "IBus-el"))
  11. (progn
  12. (require 'ibus)
  13. ;; Turn on ibus-mode automatically loading after-vine-default-setup-hook
  14. (if (boundp 'after-vine-default-setup-hook) ;;; for Vine5
  15. (add-hook 'after-vine-default-setup-hook 'ibus-mode-on)
  16. (add-hook 'after-init-hook 'ibus-mode-on))
  17. ;; define ibus-el-agent path
  18. (setq ibus-agent-file-name "/usr/share/ibus-el/ibus-el-agent")
  19. ;; Use C-SPC for Set Mark command
  20. (ibus-define-common-key ?\C-\s nil)
  21. ;; Toggle input status by Ctrl + \
  22. (global-set-key "\C-\\" 'ibus-toggle)
  23. ;; Use henkan key to enable IBus
  24. (global-set-key [henkan] 'ibus-enable)
  25. ;; Use muhenkan key to disable IBus
  26. (global-set-key [muhenkan] 'ibus-disable)
  27. ;; Enable muhenkan key only for preediting
  28. (ibus-define-common-key 'muhenkan nil)
  29. (ibus-define-preedit-key 'muhenkan t)
  30. ;; Use C-/ for Undo command
  31. (ibus-define-common-key ?\C-/ nil)
  32. ;; Change cursor color depending on IBus status
  33. (setq ibus-cursor-color '("red" "blue" "limegreen"))
  34. ;; Using ibus-anthy
  35. ;; To toggle half-width eisu mode by C-j, add the following to .emacs:
  36. (ibus-define-common-key ?\C-j t)
  37. ;; To use kana input method with jp106 keyboard, you can enable kana
  38. ;; onbiki key as follows:
  39. (setq ibus-use-kana-onbiki-key t)
  40. ;; If you use thumb shift input method, you have to specify the
  41. ;; simultaneous pressing time as:
  42. (setq ibus-ibus-simultaneous-pressing-time 0.1)
  43. ;; Using ibus-chewing
  44. ;; Please set input style to "in application window" in ibus-chewing's
  45. ;; configuration dialog.
  46. )
  47. )
  48. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  49. (provide 'vine-default-ibus-el)
  50. ;; Local Variables:
  51. ;; mode: emacs-lisp
  52. ;; End: