This commit is contained in:
Kazu Yamamoto 2014-04-07 12:02:10 +09:00
parent 894c94e48d
commit cc519edc98

View File

@ -24,11 +24,12 @@
(defun ghc-get-project-root () (defun ghc-get-project-root ()
(let ((file (buffer-file-name))) (let ((file (buffer-file-name)))
(with-temp-buffer (when file
(ghc-call-process ghc-module-command nil t nil "root" file) (with-temp-buffer
(goto-char (point-min)) (ghc-call-process ghc-module-command nil t nil "root" file)
(when (looking-at "^\\(.*\\)$") (goto-char (point-min))
(match-string-no-properties 1))))) (when (looking-at "^\\(.*\\)$")
(match-string-no-properties 1))))))
(defun ghc-with-process (send callback) (defun ghc-with-process (send callback)
(unless ghc-process-process-name (unless ghc-process-process-name