path hack.

This commit is contained in:
Kazu Yamamoto 2012-03-06 16:03:47 +09:00
parent 1b2437a60e
commit 662bcb8126
1 changed files with 10 additions and 1 deletions

View File

@ -22,7 +22,7 @@
(defconst ghc-error-buffer-name "*GHC Errors*")
(defconst ghc-flymake-allowed-file-name-masks
'("\\.l?hs$" ghc-flymake-init flymake-simple-cleanup flymake-get-real-file-name))
'("\\.l?hs$" ghc-flymake-init flymake-simple-cleanup ghc-flymake-get-real-file-name))
(defconst ghc-flymake-err-line-patterns
'("^\\(.*\\.l?hs\\):\\([0-9]+\\):\\([0-9]+\\):[ ]*\\(.+\\)" 1 2 3 4))
@ -58,6 +58,15 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun ghc-flymake-get-real-file-name (path)
(let ((bufnam (buffer-name))
(filnam (file-name-nondirectory path)))
(if (string= bufnam filnam)
bufnam
path)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun ghc-flymake-display-errors ()
(interactive)
(if (not (ghc-flymake-have-errs-p))