Skip to content

Commit c9e76dd

Browse files
committed
Remove no-op unwind-protect forms (bytecomp warning)
1 parent be26395 commit c9e76dd

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

haskell-commands.el

+2-3
Original file line numberDiff line numberDiff line change
@@ -769,9 +769,8 @@ inferior GHCi process."
769769
(haskell-session-set-target session target)
770770
(when (not (string= old-target target))
771771
(haskell-mode-toggle-interactive-prompt-state)
772-
(unwind-protect
773-
(when (y-or-n-p "Target changed, restart haskell process? ")
774-
(haskell-process-start session)))
772+
(when (y-or-n-p "Target changed, restart haskell process? ")
773+
(haskell-process-start session))
775774
(haskell-mode-toggle-interactive-prompt-state t)))))
776775

777776
;;;###autoload

haskell.el

+10-12
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,10 @@
167167
(interactive)
168168
(when (eq major-mode 'haskell-interactive-mode)
169169
(haskell-mode-toggle-interactive-prompt-state)
170-
(unwind-protect
171-
(when (and (boundp 'haskell-session)
172-
haskell-session
173-
(y-or-n-p "Kill the whole session? "))
174-
(haskell-session-kill t)))
170+
(when (and (boundp 'haskell-session)
171+
haskell-session
172+
(y-or-n-p "Kill the whole session? "))
173+
(haskell-session-kill t))
175174
(haskell-mode-toggle-interactive-prompt-state t)))
176175

177176
(defun haskell-session-make (name)
@@ -223,13 +222,12 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'."
223222
(when (not (string= name ""))
224223
(let ((session (haskell-session-lookup name)))
225224
(haskell-mode-toggle-interactive-prompt-state)
226-
(unwind-protect
227-
(if session
228-
(when
229-
(y-or-n-p
230-
(format "Session %s already exists. Use it?" name))
231-
session)
232-
(haskell-session-make name)))
225+
(if session
226+
(when
227+
(y-or-n-p
228+
(format "Session %s already exists. Use it?" name))
229+
session)
230+
(haskell-session-make name))
233231
(haskell-mode-toggle-interactive-prompt-state t)))))
234232

235233
;;;###autoload

0 commit comments

Comments
 (0)