diff options
| author | Dmitry Gutov | 2020-08-27 00:47:18 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2020-08-27 00:56:16 +0300 |
| commit | 7f6dba00edcccd6510185108a5c4bbb010393230 (patch) | |
| tree | 684a58b97787345b35451141b185890682306231 | |
| parent | 14fb657ba82da346d36f05f88da26f1c5498b798 (diff) | |
| download | emacs-7f6dba00edcccd6510185108a5c4bbb010393230.tar.gz emacs-7f6dba00edcccd6510185108a5c4bbb010393230.zip | |
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).
| -rw-r--r-- | lisp/progmodes/xref.el | 5 |
1 files changed, 4 insertions, 1 deletions
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." | |||
| 608 | (user-error "No reference at point"))) | 608 | (user-error "No reference at point"))) |
| 609 | (xref--current-item xref)) | 609 | (xref--current-item xref)) |
| 610 | (xref--show-location (xref-item-location xref) (if quit 'quit t)) | 610 | (xref--show-location (xref-item-location xref) (if quit 'quit t)) |
| 611 | (next-error-found buffer (current-buffer)))) | 611 | (if (fboundp 'next-error-found) |
| 612 | (next-error-found buffer (current-buffer)) | ||
| 613 | ;; Emacs < 27 | ||
| 614 | (setq next-error-last-buffer buffer)))) | ||
| 612 | 615 | ||
| 613 | (defun xref-quit-and-goto-xref () | 616 | (defun xref-quit-and-goto-xref () |
| 614 | "Quit *xref* buffer, then jump to xref on current line." | 617 | "Quit *xref* buffer, then jump to xref on current line." |