Skip to content

Fallback to tags if there is no haskell-session #1330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions haskell-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down