Skip to content

Commit

Permalink
Merge pull request #1137 from bergey/stylish-haskell-after-save
Browse files Browse the repository at this point in the history
Stylish haskell after save
  • Loading branch information
gracjan committed Feb 6, 2016
2 parents d4e2e33 + df528b8 commit 438b914
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 2 additions & 1 deletion haskell-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,8 @@ To be added to `flymake-init-create-temp-buffer-copy'."

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

;; From Bryan O'Sullivan's blog:
;; http://www.serpentine.com/blog/2007/10/09/using-emacs-to-insert-scc-annotations-in-haskell-code/
Expand Down
7 changes: 1 addition & 6 deletions haskell.el
Original file line number Diff line number Diff line change
Expand Up @@ -380,12 +380,7 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'."
"Function that will be called after buffer's saving."
(when haskell-tags-on-save
(ignore-errors (when (and (boundp 'haskell-session) haskell-session)
(haskell-process-generate-tags))))
(when haskell-stylish-on-save
(ignore-errors (haskell-mode-stylish-buffer))
(let ((before-save-hook '())
(after-save-hook '()))
(basic-save-buffer))))
(haskell-process-generate-tags)))))

;;;###autoload
(defun haskell-mode-tag-find (&optional _next-p)
Expand Down

0 comments on commit 438b914

Please sign in to comment.