Unbreak xref-goto-xref in Emacs 26

* lisp/progmodes/xref.el (xref-goto-xref):
Call next-error-found only if it's defined (bug#42981).
This commit is contained in:
Dmitry Gutov 2020-08-27 00:47:18 +03:00
parent 14fb657ba8
commit 7f6dba00ed

View file

@ -608,7 +608,10 @@ buffer."
(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))))
(if (fboundp 'next-error-found)
(next-error-found buffer (current-buffer))
;; Emacs < 27
(setq next-error-last-buffer buffer))))
(defun xref-quit-and-goto-xref ()
"Quit *xref* buffer, then jump to xref on current line."