From 662bcb812657a1c138fb1681ff58db918486e95a Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Tue, 6 Mar 2012 16:03:47 +0900 Subject: [PATCH] path hack. --- elisp/ghc-flymake.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/elisp/ghc-flymake.el b/elisp/ghc-flymake.el index 70d0f73..dda0968 100644 --- a/elisp/ghc-flymake.el +++ b/elisp/ghc-flymake.el @@ -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))