branch: elpa/haskell-mode commit fa14bc6f9ac3a4a6308b30707c88fc79c5761c9d Author: Stuart Popejoy <slpope...@users.noreply.github.com> Commit: Stuart Popejoy <slpope...@users.noreply.github.com>
Fix linting for current module when reloading another module --- haskell-load.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/haskell-load.el b/haskell-load.el index f33987b..7714ba7 100644 --- a/haskell-load.el +++ b/haskell-load.el @@ -542,11 +542,13 @@ When MODULE-BUFFER is non-NIL, paint error overlays." (line (plist-get location :line)) (col1 (plist-get location :col))) (when (and module-buffer haskell-process-show-overlays) - (haskell-check-paint-overlay - module-buffer - (string= (file-truename (buffer-file-name module-buffer)) - (file-truename file)) - line error-msg file type nil col1)) + ;; conform default-directory to session current-dir for 'file-truename' + (let ((default-directory (haskell-session-current-dir session))) + (haskell-check-paint-overlay + module-buffer + (string= (file-truename (buffer-file-name module-buffer)) + (file-truename file)) + line error-msg file type nil col1))) (if return-only (list :file file :line line :col col1 :msg error-msg :type type) (progn (funcall (cl-case type