summaryrefslogtreecommitdiff
path: root/lisp/progmodes/xref.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2018-12-24 05:11:02 +0200
committerDmitry Gutov <dgutov@yandex.ru>2018-12-24 05:11:02 +0200
commitfd244507c5ea1e7e425f09585fcf15cc90598e9b (patch)
tree38c8c66813d0fdf57efbeb6d1b25f09995846ca3 /lisp/progmodes/xref.el
parentd4c1518474888c45cd134d72d2a06ff3d36e84e4 (diff)
downloademacs-fd244507c5ea1e7e425f09585fcf15cc90598e9b.tar.gz
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.
Diffstat (limited to 'lisp/progmodes/xref.el')
-rw-r--r--lisp/progmodes/xref.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index a0a704f133d..c71802c9188 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -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))))