Skip to content

Commit ec14cc3

Browse files
committed
Merge pull request #865 from haskell/no-set-mark-on-xref-push
Don't spuriously set mark on xref push
2 parents 3a03999 + d3995a5 commit ec14cc3

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

haskell-commands.el

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,12 +364,7 @@ position with `xref-pop-marker-stack'."
364364
(haskell-mode-handle-generic-loc loc)
365365
(call-interactively 'haskell-mode-tag-find))
366366
(unless (equal initial-loc (point-marker))
367-
(with-current-buffer (marker-buffer initial-loc)
368-
(save-excursion
369-
(goto-char initial-loc)
370-
(set-mark-command nil)
371-
;; Store position for return with `xref-pop-marker-stack'
372-
(xref-push-marker-stack))))))
367+
(xref-push-marker-stack initial-loc))))
373368

374369
;;;###autoload
375370
(defun haskell-mode-goto-loc ()

haskell-compat.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ A process is considered alive if its status is `run', `open',
4343
(unless (fboundp 'xref-push-marker-stack)
4444
(defalias 'xref-pop-marker-stack 'pop-tag-mark)
4545

46-
(defun xref-push-marker-stack ()
46+
(defun xref-push-marker-stack (&optional m)
4747
"Add point to the marker stack."
48-
(ring-insert find-tag-marker-ring (point-marker))))
48+
(ring-insert find-tag-marker-ring (or m (point-marker)))))
4949

5050
(unless (fboundp 'outline-hide-sublevels)
5151
(defalias 'outline-hide-sublevels 'hide-sublevels))

0 commit comments

Comments
 (0)