error messages are stored after NG, not printed in stderr.

This commit is contained in:
Kazu Yamamoto
2014-08-19 14:56:01 +09:00
parent e696a66dfa
commit a483f4f8b6
3 changed files with 15 additions and 5 deletions

View File

@@ -110,7 +110,7 @@ nil does not display errors/warnings.
(setq mode-line-process (format " %d:%d" elen wlen)))))
(force-mode-line-update))))
(t
(let* ((err (buffer-substring-no-properties (point-min) (point)))
(let* ((err (ghc-unescape-string (buffer-substring-no-properties (+ (point) 3) (point-max))))
(info (ghc-make-hilit-info
:file "Fail errors:"
:line 0

View File

@@ -32,6 +32,17 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun ghc-unescape-string (str)
(with-temp-buffer
(insert str)
(goto-char (point-min))
(while (search-forward "\\n" nil t) (replace-match "\n" nil t))
(goto-char (point-min))
(while (search-forward "\\\\" nil t) (replace-match "\\" nil t))
(buffer-substring-no-properties (point-min) (point-max))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmacro ghc-add (sym val)
`(setq ,sym (cons ,val ,sym)))