Merge branch 'master' of github.com:kazu-yamamoto/ghc-mod

This commit is contained in:
Daniel Gröber
2015-08-14 10:38:23 +02:00
3 changed files with 10 additions and 4 deletions

View File

@@ -65,7 +65,9 @@ nil do not display errors/warnings.
(defun ghc-check-syntax ()
(interactive)
;; Only check syntax of visible buffers
(when (get-buffer-window (current-buffer) t)
(when (and (buffer-file-name)
(file-exists-p (buffer-file-name))
(get-buffer-window (current-buffer) t))
(with-timeout
(10 (error "ghc process may have hung or exited with an error"))
(while ghc-process-running (sleep-for 0.1)))

View File

@@ -10,6 +10,9 @@
(require 'ghc-func)
(defvar ghc-debug-options nil)
;; (setq ghc-debug-options '("-v9"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar ghc-process-running nil)
@@ -68,7 +71,8 @@
(t cpro)))
(defun ghc-start-process (name buf)
(let* ((opts (append '("-b" "\n" "-l" "--line-prefix=O: ,E: ")
(let* ((opts (append ghc-debug-options
'("-b" "\n" "-l" "--line-prefix=O: ,E: ")
(ghc-make-ghc-options)
'("legacy-interactive")))
(pro (apply 'start-file-process name buf ghc-command opts)))