15/07/26 00:13:27.06 PVnmMw3N0.net
最終的にこんな感じの設定になりました
;; 新アドバイス版
(defun ad-start-process-to-fake (orig-fun &rest args)
(when (and (nth 2 args)
(or process-connection-type
(member (replace-regexp-in-string "\\.exe$" "" (file-name-nondirectory (nth 2 args)))
fakecygpty-program-list))
(not compilation-disable-input))
(setcdr (nthcdr 2 args) (cons (nth 2 args) (nthcdr 3 args)))
(setcar (nthcdr 2 args) "fakecygpty"))
(apply orig-fun args))
(advice-add 'start-process :around #'ad-start-process-to-fake '((depth . -100)))
;; 旧アドバイス版
(defadvice start-process (around ad-start-process-to-fake last activate)
(when (and (ad-get-arg 2)
(or process-connection-type
(member (replace-regexp-in-string "\\.exe$" "" (file-name-nondirectory (ad-get-arg 2)))
fakecygpty-program-list))
(not compilation-disable-input))
(ad-set-args 3 (cons (ad-get-arg 2) (ad-get-args 3)))
(ad-set-arg 2 "fakecygpty"))
ad-do-it)