Skip to content

Commit

Permalink
Quick hack to remove "Compilation failed" line
Browse files Browse the repository at this point in the history
A better solution would be to use markers for these, but I'll prefer
to do that as a general update to interactive-mode when I've more
time. Everything can use markers to get rid of the ugly regex hacks.
  • Loading branch information
chrisdone committed Jan 15, 2014
1 parent f13eae5 commit 0ae55ff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions haskell-interactive-mode.el
Expand Up @@ -603,6 +603,11 @@ FILE-NAME only."
(with-current-buffer (haskell-session-interactive-buffer session)
(save-excursion
(goto-char (point-min))
(when (search-forward-regexp "^Compilation failed.$" nil t 1)
(let ((inhibit-read-only t))
(delete-region (line-beginning-position)
(1+ (line-end-position))))
(goto-char (point-min)))
(while (when (re-search-forward haskell-interactive-mode-error-regexp nil t)
(let ((msg-file-name (match-string-no-properties 1))
(msg-startpos (line-beginning-position)))
Expand Down

0 comments on commit 0ae55ff

Please sign in to comment.