Created
November 16, 2012 07:09
-
-
Save syohex/4085014 to your computer and use it in GitHub Desktop.
popup error message with flymake at current line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun flymake-display-err-menu-for-current-line () | |
(interactive) | |
(let* ((line (flymake-current-line-no)) | |
(line-err-info (flymake-find-err-info flymake-err-info line)) | |
(error-infos (nth 0 line-err-info)) | |
(eof-char (char-to-string 0))) | |
(when error-infos | |
(loop for error-info in error-infos | |
for message = (flymake-ler-text error-info) | |
for file = (flymake-ler-file error-info) | |
for line = (flymake-ler-line error-info) | |
for filemsg = (or (and file " - %s(%d)" file line) "") | |
;; @@ remove EOF char, haskell error message contain EOF | |
for removed-eof = (replace-regexp-in-string eof-char "\n" message) | |
collect (format "%s%s" removed-eof filemsg) into messages | |
finally | |
(popup-tip (mapconcat 'identity | |
(delete-duplicates messages :test #'string=) | |
"\n")))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment