- (if (and (featurep 'migemo) (string= type "emacs"))
- (howm-funcall-if-defined (migemo-get-pattern roma))
-;; (migemo-get-pattern roma)
- (car (howm-call-process (or howm-migemo-client "migemo-client")
- `(,@howm-migemo-client-option "-t" ,type ,roma)
- 0))))
-
-;; (defun howm-migemo-get-pattern (roma type)
-;; (when (and (null (howm-migemo-client)) (not howm-view-use-grep))
-;; (require 'migemo))
-;; (if (and (featurep 'migemo) (string= type "emacs"))
-;; (howm-funcall-if-defined (migemo-get-pattern roma))
-;; ;; (migemo-get-pattern roma)
-;; (car (howm-call-process (howm-migemo-client)
-;; `(,@(howm-migemo-client-option) "-t" ,type ,roma)
-;; 0))))
-
-;; (defun howm-migemo-client ()
-;; (if (stringp howm-migemo-client)
-;; howm-migemo-client
-;; (or (car howm-migemo-client) "migemo-client")))
-
-;; (defun howm-migemo-client-option ()
-;; (cdr-safe howm-migemo-client))
+ (cl-labels ((ref (key) (cdr (assoc key howm-migemo-client))))
+ (cond ((and (featurep 'migemo) (string= type "emacs"))
+ (howm-funcall-if-defined (migemo-get-pattern roma)))
+ ((or (null howm-migemo-client) (stringp howm-migemo-client))
+ (car (howm-call-process (or howm-migemo-client "migemo-client")
+ `(,@howm-migemo-client-option "-t" ,type ,roma)
+ 0)))
+ ((eq (ref 'type) 'cmigemo)
+ (car (howm-call-process (ref 'command)
+ `(,@howm-migemo-client-option
+ ,@(and (string= type "emacs") '("-e"))
+ "-w" ,roma))))
+ (t (error "Invalid howm-migemo-client: %s" howm-migemo-client)))))