(require 'chinese-word-at-point) ;;; 茶筌で分かち書きをする (setq chinese-word-split-command "echo %s | chasen -F '%%m '") ;;; ひらがな・カタカナを加えるように修正 (defun chinese-word--cjk-characters-p (char) "Return t if CHAR is a CJK character. For CJK characters range in Unicode, see URL `http://stackoverflow.com/questions/1366068/whats-the-complete-range-for-chinese-characters-in-unicode/'" (or (<= #x4E00 char #x9FCC) (<= #x3040 char #x309F) ;hiragana (<= #x30A0 char #x30FF) ;katakana (<= #x31F0 char #x31FF) ;small katakana (<= #x3400 char #x4DB5) (<= #x20000 char #x2A6D6) (<= #x2A700 char #x2B734) (<= #x2B740 char #x2B81D))) ;;; 日本語に適用しているのにchineseというのはよくないのでjapaneseも定義 ;;; (thing-at-point 'japanese-word) ;;; (thing-at-point 'japanese-or-other-word) ;;; が使えるようになる (put 'japanese-word 'bounds-of-thing-at-point 'chinese-word-at-point-bounds) (put 'japanese-or-other-word 'bounds-of-thing-at-point 'chinese-or-other-word-at-point-bounds) ;;; テストコマンド (defun show-word-at-point-ja () "現在の単語をミニバッファに表示する(日本語対応)" (interactive) (message "%s" (thing-at-point 'japanese-or-other-word))) ;;; Emacsは楽しい システムのメンテナンス 研究・情報収集