From 9d1c7d0762ae1c14dbd2b8ad9960ae29d075773c Mon Sep 17 00:00:00 2001 From: Fice T Date: Sun, 24 Apr 2016 11:18:55 -0600 Subject: [PATCH] Simplify haskell-interactive-handle-expr Gets rid of a check that was made redundant in a previous PR (GH-457). --- haskell-repl.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/haskell-repl.el b/haskell-repl.el index 71a694319..20180b5c2 100644 --- a/haskell-repl.el +++ b/haskell-repl.el @@ -22,15 +22,13 @@ (defun haskell-interactive-handle-expr () "Handle an inputted expression at the REPL." - (let ((expr (haskell-interactive-mode-input)) - (at-prompt-line (>= (line-end-position) - haskell-interactive-mode-prompt-start))) - (if (and at-prompt-line - (string= "" (replace-regexp-in-string " " "" expr))) + (let ((expr (haskell-interactive-mode-input))) + (if (string= "" (replace-regexp-in-string " " "" expr)) + ;; Just make a new prompt on space-only input (progn - (goto-char (point-max)) - (insert "\n") - (haskell-interactive-mode-prompt)) + (goto-char (point-max)) + (insert "\n") + (haskell-interactive-mode-prompt)) (when (haskell-interactive-at-prompt) (cond ;; If already evaluating, then the user is trying to send