1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

xref-goto-xref: Highlight the exact symbol after the jump

* lisp/progmodes/xref.el (xref-goto-xref): Bind
'xref--current-item' to highlight the exact symbol after the jump
and not the whole line.
This commit is contained in:
Dmitry Gutov 2018-12-24 05:11:02 +02:00
parent d4c1518474
commit fd244507c5

View file

@ -551,9 +551,10 @@ SELECT is `quit', also quit the *xref* window."
Non-interactively, non-nil QUIT means to first quit the *xref*
buffer."
(interactive)
(let ((buffer (current-buffer))
(xref (or (xref--item-at-point)
(user-error "No reference at point"))))
(let* ((buffer (current-buffer))
(xref (or (xref--item-at-point)
(user-error "No reference at point")))
(xref--current-item xref))
(xref--show-location (xref-item-location xref) (if quit 'quit t))
(next-error-found buffer (current-buffer))))