Skip to content

Commit 41c23f3

Browse files
committed
run stylish-haskell before save
1 parent d4e2e33 commit 41c23f3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

haskell-mode.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,8 @@ To be added to `flymake-init-create-temp-buffer-copy'."
872872

873873
(defun haskell-mode-before-save-handler ()
874874
"Function that will be called before buffer's saving."
875-
)
875+
(when haskell-stylish-on-save
876+
(ignore-errors (haskell-mode-stylish-buffer))))
876877

877878
;; From Bryan O'Sullivan's blog:
878879
;; http://www.serpentine.com/blog/2007/10/09/using-emacs-to-insert-scc-annotations-in-haskell-code/

haskell.el

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,6 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'."
381381
(when haskell-tags-on-save
382382
(ignore-errors (when (and (boundp 'haskell-session) haskell-session)
383383
(haskell-process-generate-tags))))
384-
(when haskell-stylish-on-save
385-
(ignore-errors (haskell-mode-stylish-buffer))
386384
(let ((before-save-hook '())
387385
(after-save-hook '()))
388386
(basic-save-buffer))))

0 commit comments

Comments
 (0)