Skip to content

Commit

Permalink
Check for build/install as substring
Browse files Browse the repository at this point in the history
Sometimes you might run C-c c (cabal command) and then type build
--ghc-options=-fforce-recomp, but then it wouldn't've been treated as
a build process and compiling/messages wouldn't be handled
specially. So this patch just checks for the prefix "build" or
"install" and then ignores anything afterwards.
  • Loading branch information
chrisdone committed Jan 22, 2014
1 parent a4a8a09 commit 7b3946d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions haskell-process.el
Expand Up @@ -465,11 +465,14 @@ to be loaded by ghci."

:live
(lambda (state buffer)
(cond ((or (string= (caddr state) "build")
(string= (caddr state) "install"))
(haskell-process-live-build (cadr state) buffer t))
(t
(haskell-process-cabal-live state buffer))))
(let ((cmd (replace-regexp-in-string "^\\([a-z]+\\).*"
"\\1"
(caddr state))))
(cond ((or (string= cmd "build")
(string= cmd "install"))
(haskell-process-live-build (cadr state) buffer t))
(t
(haskell-process-cabal-live state buffer)))))

:complete
(lambda (state response)
Expand Down

0 comments on commit 7b3946d

Please sign in to comment.