Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3d977d8

Browse files
committed
Delete -emacs-elixir-format files
1 parent 7641373 commit 3d977d8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

elixir-format.el

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@ files in subdirectories."
114114
(setq our-elixir-format-arguments (append our-elixir-format-arguments elixir-format-arguments)))
115115
(setq our-elixir-format-arguments (append our-elixir-format-arguments (list tmpfile)))
116116

117-
(if (zerop (elixir-format--from-mix-root (elixir-format--mix-executable) (elixir-format--errbuff) our-elixir-format-arguments))
118-
(elixir-format--call-format-command tmpfile)
119-
(elixir-format--failed-to-format called-interactively-p))
120-
(delete-file tmpfile)
121-
(kill-buffer (elixir-format--outbuff))))
117+
(unwind-protect
118+
(if (zerop (elixir-format--from-mix-root (elixir-format--mix-executable) (elixir-format--errbuff) our-elixir-format-arguments))
119+
(elixir-format--call-format-command tmpfile)
120+
(elixir-format--failed-to-format called-interactively-p))
121+
(delete-file tmpfile)
122+
(kill-buffer (elixir-format--outbuff)))))
122123

123124
(defun elixir-format--call-format-command (tmpfile)
124125
(if (zerop (call-process-region (point-min) (point-max) "diff" nil (elixir-format--outbuff) nil "-n" "-" tmpfile))

0 commit comments

Comments
 (0)