Permalink
Browse files

Ignore errors in 'before-save-hooks'

In case the file does not yet exist on the file system, or anything else goes
wrong, do we REALLY want to prevent the user from saving his valueable
changes?? - No I would say, hence I added 'ignore-errors'
  • Loading branch information...
1 parent df265ed commit 01336fc6d50212d8a3cb94aacd93bf172965c10b @sheyll sheyll committed Nov 22, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 haskell-mode.el
View
3 haskell-mode.el
@@ -763,7 +763,8 @@ This function will be called with no arguments.")
(defun haskell-mode-before-save-handler ()
"Function that will be called before buffer's saving."
(when haskell-stylish-on-save
- (haskell-mode-stylish-buffer)))
+ (ignore-errors ; save anyway!
+ (haskell-mode-stylish-buffer))))
(defun haskell-mode-after-save-handler ()
"Function that will be called after buffer's saving."

0 comments on commit 01336fc

Please sign in to comment.