ghc-mod root.

This commit is contained in:
Kazu Yamamoto
2014-03-20 16:21:48 +09:00
parent 1a1ee0f3ae
commit ee6dc2fc47
5 changed files with 30 additions and 5 deletions

View File

@@ -9,7 +9,6 @@
;;; Code:
;; other files' errors should go to 0
;; ghc-flymake-display-errors -> line column
;; ghc-flymake-jump
(require 'ghc-func)
@@ -22,9 +21,9 @@
(defun ghc-check-get-process-name ()
(let ((file (buffer-file-name)))
(with-temp-buffer
(ghc-call-process ghc-module-command nil t nil "debug" file)
(ghc-call-process ghc-module-command nil t nil "root" file)
(goto-char (point-min))
(when (re-search-forward "^Root directory: +\\(.*\\)$" nil t)
(when (looking-at "^\\(.*\\)$")
(match-string-no-properties 1)))))
(defun ghc-check-syntax ()

View File

@@ -40,7 +40,9 @@
(defun ghc-save-buffer ()
(interactive)
(if (buffer-modified-p) (call-interactively 'save-buffer))
;; fixme: better way then saving?
(set-buffer-modified-p t)
(call-interactively 'save-buffer)
(ghc-check-syntax))
(provide 'ghc-command)