From: Dmitry Gutov Date: Wed, 26 Aug 2020 21:47:18 +0000 (+0300) Subject: Unbreak xref-goto-xref in Emacs 26 X-Git-Tag: emacs-28.0.90~6374 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7f6dba00edcccd6510185108a5c4bbb010393230;p=emacs.git 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). --- diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index bbf899e7017..4da7b4ef301 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -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."