ShingoFukuyama
1/21/2015 - 7:47 AM

migemo_with_helm.el

  (when (executable-find "cmigemo")
    (when (require 'migemo nil t)
      (setq migemo-command "cmigemo")
      (setq migemo-options '("-q" "--emacs"))
      (setq migemo-dictionary "/usr/local/share/migemo/utf-8/migemo-dict")
      (setq migemo-user-dictionary nil)
      (setq migemo-regex-dictionary nil)
      (setq migemo-coding-system 'utf-8)
      (load-library "migemo")
      (migemo-init)))

  (setq helm-use-migemo t)

  (when (require 'helm-migemo nil t)
    (defun helm-compile-source--candidates-in-buffer (source)
      (helm-aif (assoc 'candidates-in-buffer source)
          (append source
                  `((candidates . ,(or (cdr it)
                                       (lambda ()
                                         (helm-candidates-in-buffer
                                          (helm-get-current-source)))))
                    (volatile) (match identity)))
        source)))