Skip to content

Commit

Permalink
Remove stack-exec-path-mode, which I no longer use
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell authored and cdadar committed Jul 12, 2021
1 parent 974460e commit fa0d60a
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions lisp/init-haskell.el
Expand Up @@ -44,28 +44,6 @@
(add-to-list 'page-break-lines-modes 'haskell-mode)))



(define-minor-mode stack-exec-path-mode
"If this is a stack project, set `exec-path' to the path \"stack exec\" would use."
nil
:lighter ""
:global nil
(if stack-exec-path-mode
(when (and (executable-find "stack")
(locate-dominating-file default-directory "stack.yaml"))
(let ((stack-path (replace-regexp-in-string
"[\r\n]+\\'" ""
(shell-command-to-string (concat "stack exec -- sh -c "
(shell-quote-argument "echo $PATH"))))))
(setq-local exec-path (seq-uniq (parse-colon-path stack-path) 'string-equal))
(make-local-variable 'process-environment)
(setenv "PATH" (string-join exec-path path-separator))))
(kill-local-variable 'exec-path)
(kill-local-variable 'process-environment)))

(add-hook 'haskell-mode-hook 'stack-exec-path-mode)



(when (maybe-require-package 'dhall-mode)
(add-hook 'dhall-mode-hook 'stack-exec-path-mode))
Expand Down

0 comments on commit fa0d60a

Please sign in to comment.