From: Dmitry Gutov Date: Sat, 2 Sep 2023 01:59:20 +0000 (+0300) Subject: xref.el: Ensure that the return value is the buffer X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f735eb962815be2e62d4b876963baa744f65139d;p=emacs.git xref.el: Ensure that the return value is the buffer * lisp/progmodes/xref.el (xref--show-xrefs, xref--show-defs): Ensure the return value of the funcall is returned (bug#65631). --- diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 9b64ef4de10..b7bfb192d87 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1480,20 +1480,22 @@ The meanings of both arguments are the same as documented in (setq xrefs 'called-already))))))) (let ((cb (current-buffer)) (pt (point))) - (funcall xref-show-xrefs-function fetcher - `((window . ,(selected-window)) - (display-action . ,display-action) - (auto-jump . ,xref-auto-jump-to-first-xref))) - (xref--push-markers cb pt))) + (prog1 + (funcall xref-show-xrefs-function fetcher + `((window . ,(selected-window)) + (display-action . ,display-action) + (auto-jump . ,xref-auto-jump-to-first-xref))) + (xref--push-markers cb pt)))) (defun xref--show-defs (xrefs display-action) (let ((cb (current-buffer)) (pt (point))) - (funcall xref-show-definitions-function xrefs - `((window . ,(selected-window)) - (display-action . ,display-action) - (auto-jump . ,xref-auto-jump-to-first-definition))) - (xref--push-markers cb pt))) + (prog1 + (funcall xref-show-definitions-function xrefs + `((window . ,(selected-window)) + (display-action . ,display-action) + (auto-jump . ,xref-auto-jump-to-first-definition))) + (xref--push-markers cb pt)))) (defun xref--push-markers (buf pt) (when (buffer-live-p buf)