diff --git a/haskell-cabal.el b/haskell-cabal.el index 5416ea643..e6bc7dc01 100644 --- a/haskell-cabal.el +++ b/haskell-cabal.el @@ -1097,26 +1097,7 @@ recursively avoiding visiting unnecessary heavy directories like cabal-install, stack, etc and passes list of found files to Hasktags." (if (eq system-type 'windows-nt) (format "hasktags --output=\"%s\\TAGS\" -x -e \"%s\"" dir dir) - (format "cd %s && %s | %s" - dir - (concat "find . " - "-type d \\( " - "-path ./.git " - "-o -path ./.svn " - "-o -path ./_darcs " - "-o -path ./.stack-work " - "-o -path ./dist " - "-o -path ./.cabal-sandbox " - "\\) -prune " - "-o -type f \\( " - "-name '*.hs' " - "-or -name '*.lhs' " - "-or -name '*.hsc' " - "\\) -not \\( " - "-name '#*' " - "-or -name '.*' " - "\\) -print0") - "xargs -0 hasktags -e -x"))) + (format "cd %s && hasktags . -e -x" dir))) (provide 'haskell-cabal) ;;; haskell-cabal.el ends here diff --git a/haskell-commands.el b/haskell-commands.el index d2d798510..57c60c897 100644 --- a/haskell-commands.el +++ b/haskell-commands.el @@ -350,13 +350,13 @@ If the definition or tag is found, the location from which you jumped will be pushed onto `xref--marker-ring', so you can return to that position with `xref-pop-marker-stack'." (interactive "P") - (let ((initial-loc (point-marker)) - (loc (haskell-mode-find-def (haskell-ident-at-point)))) - (if (not loc) - (call-interactively 'haskell-mode-tag-find) - (haskell-mode-handle-generic-loc loc) - (unless (equal initial-loc (point-marker)) - (xref-push-marker-stack initial-loc))))) + (if (haskell-session-maybe) + (let ((initial-loc (point-marker)) + (loc (haskell-mode-find-def (haskell-ident-at-point)))) + (haskell-mode-handle-generic-loc loc) + (unless (equal initial-loc (point-marker)) + (xref-push-marker-stack initial-loc))) + (call-interactively 'haskell-mode-tag-find))) ;;;###autoload (defun haskell-mode-goto-loc () diff --git a/haskell-mode.el b/haskell-mode.el index 917581155..2b129e0a7 100644 --- a/haskell-mode.el +++ b/haskell-mode.el @@ -207,6 +207,7 @@ be set to the preferred literate style." (define-key map (kbd "C-c C-t") 'haskell-mode-enable-process-minor-mode) (define-key map (kbd "C-c C-i") 'haskell-mode-enable-process-minor-mode) (define-key map (kbd "C-c C-s") 'haskell-mode-toggle-scc-at-point) + (define-key map (kbd "M-.") 'haskell-mode-tag-find) map) "Keymap used in `haskell-mode'.")