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

This commit is contained in:
Daniel Gröber 2015-08-13 10:10:08 +02:00
commit b58578c48b
3 changed files with 26 additions and 24 deletions

View File

@ -137,7 +137,7 @@ nil does not display errors/warnings.
info infos)
(dolist (err errs (nreverse infos))
(when (string-match regex err)
(let* ((file (expand-file-name (match-string 1 err) (ghc-get-project-root))) ;; for Windows
(let* ((file (expand-file-name (match-string 1 err) ghc-process-root)) ;; for Windows
(line (string-to-number (match-string 2 err)))
(coln (string-to-number (match-string 3 err)))
(msg (match-string 4 err))

View File

@ -19,6 +19,7 @@
(defvar-local ghc-process-original-file nil)
(defvar-local ghc-process-callback nil)
(defvar-local ghc-process-hook nil)
(defvar-local ghc-process-root nil)
(defvar ghc-command "ghc-mod")
@ -28,8 +29,9 @@
(ghc-run-ghc-mod '("root")))
(defun ghc-with-process (cmd callback &optional hook1 hook2)
(let ((root (ghc-get-project-root)))
(unless ghc-process-process-name
(setq ghc-process-process-name (ghc-get-project-root)))
(setq ghc-process-process-name root))
(when (and ghc-process-process-name (not ghc-process-running))
(setq ghc-process-running t)
(if hook1 (funcall hook1))
@ -43,13 +45,14 @@
(setq ghc-process-original-file file)
(setq ghc-process-callback callback)
(setq ghc-process-hook hook2)
(setq ghc-process-root root)
(erase-buffer)
(let ((pro (ghc-get-process cpro name buf)))
(process-send-string pro cmd)
(when ghc-debug
(ghc-with-debug-buffer
(insert (format "%% %s" cmd))))
pro)))))
pro))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View File

@ -146,7 +146,6 @@
(insert "\nVersion: all GHC versions must be the same.\n")
(insert (format "\t ghc.el version %s\n" el-ver))
(insert (format "\t %s\n" ghc-mod-ver))
(insert (format "\t%s\n" ghc-modi-ver))
(insert (format "\t%s\n" ghc-ver))
(insert "\nEnvironment variables:\n")
(insert (format "\tPATH=%s\n" path))))