ghc-mod root.
This commit is contained in:
@@ -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 ()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user