Permalink
Browse files

Maybe support config file.

  • Loading branch information...
1 parent ccabffc commit 5d2ee749c723a7706e6facdedf2ab6d294f78a3f @chrisdone chrisdone committed Jun 8, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 haskell-mode.el
View
@@ -753,6 +753,7 @@ This function will be called with no arguments.")
"Save the current buffer."
(interactive)
(let ((modified (buffer-modified-p)))
+ (save-buffer)
(when haskell-stylish-on-save
(haskell-mode-stylish-buffer))
(save-buffer)
@@ -766,10 +767,13 @@ This function will be called with no arguments.")
buffer remains unchanged."
(let* ((file (buffer-file-name (current-buffer)))
(output (with-temp-buffer
- (call-process cmd
- file
- (list t nil)
- nil)
+ (let ((default-directory (if haskell-session
+ (haskell-session-cabal-dir haskell-session)
+ default-directory)))
+ (call-process cmd
+ file
+ (list t nil)
+ nil))
(buffer-substring-no-properties (point-min) (point-max)))))
(unless (string= "" output)
(erase-buffer)

0 comments on commit 5d2ee74

Please sign in to comment.