branch: elpa/haskell-mode
commit c9e76ddd22496009505b9b4190d01d67b16ccf72
Author: Steve Purcell <st...@sanityinc.com>
Commit: Steve Purcell <st...@sanityinc.com>

    Remove no-op unwind-protect forms (bytecomp warning)
---
 haskell-commands.el |  5 ++---
 haskell.el          | 22 ++++++++++------------
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/haskell-commands.el b/haskell-commands.el
index c9ae488b4f..992bb9c9e4 100644
--- a/haskell-commands.el
+++ b/haskell-commands.el
@@ -769,9 +769,8 @@ inferior GHCi process."
       (haskell-session-set-target session target)
       (when (not (string= old-target target))
         (haskell-mode-toggle-interactive-prompt-state)
-        (unwind-protect
-            (when (y-or-n-p "Target changed, restart haskell process? ")
-              (haskell-process-start session)))
+        (when (y-or-n-p "Target changed, restart haskell process? ")
+          (haskell-process-start session))
         (haskell-mode-toggle-interactive-prompt-state t)))))
 
 ;;;###autoload
diff --git a/haskell.el b/haskell.el
index eae8d2b9f8..33e7ac7b47 100644
--- a/haskell.el
+++ b/haskell.el
@@ -167,11 +167,10 @@
   (interactive)
   (when (eq major-mode 'haskell-interactive-mode)
     (haskell-mode-toggle-interactive-prompt-state)
-    (unwind-protect
-        (when (and (boundp 'haskell-session)
-                   haskell-session
-                   (y-or-n-p "Kill the whole session? "))
-          (haskell-session-kill t)))
+    (when (and (boundp 'haskell-session)
+               haskell-session
+               (y-or-n-p "Kill the whole session? "))
+      (haskell-session-kill t))
     (haskell-mode-toggle-interactive-prompt-state t)))
 
 (defun haskell-session-make (name)
@@ -223,13 +222,12 @@ If `haskell-process-load-or-reload-prompt' is nil, accept 
`default'."
     (when (not (string= name ""))
       (let ((session (haskell-session-lookup name)))
         (haskell-mode-toggle-interactive-prompt-state)
-        (unwind-protect
-            (if session
-                (when
-                    (y-or-n-p
-                     (format "Session %s already exists. Use it?" name))
-                  session)
-              (haskell-session-make name)))
+        (if session
+            (when
+                (y-or-n-p
+                 (format "Session %s already exists. Use it?" name))
+              session)
+          (haskell-session-make name))
         (haskell-mode-toggle-interactive-prompt-state t)))))
 
 ;;;###autoload

Reply via email to