Skip to content

Commit 22b8e3a

Browse files
committed
Merge pull request #1142 from haskell/revert-1137-stylish-haskell-after-save
Revert "Stylish haskell after save"
2 parents 7972207 + aa10bd6 commit 22b8e3a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

haskell-mode.el

+1-2
Original file line numberDiff line numberDiff line change
@@ -872,8 +872,7 @@ 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-
(when haskell-stylish-on-save
876-
(ignore-errors (haskell-mode-stylish-buffer))))
875+
)
877876

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

haskell.el

+6-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,12 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'."
380380
"Function that will be called after buffer's saving."
381381
(when haskell-tags-on-save
382382
(ignore-errors (when (and (boundp 'haskell-session) haskell-session)
383-
(haskell-process-generate-tags)))))
383+
(haskell-process-generate-tags))))
384+
(when haskell-stylish-on-save
385+
(ignore-errors (haskell-mode-stylish-buffer))
386+
(let ((before-save-hook '())
387+
(after-save-hook '()))
388+
(basic-save-buffer))))
384389

385390
;;;###autoload
386391
(defun haskell-mode-tag-find (&optional _next-p)

0 commit comments

Comments
 (0)