From: Juri Linkov Date: Sat, 14 Nov 2020 20:36:13 +0000 (+0200) Subject: * lisp/progmodes/xref.el (xref-goto-xref): Prefix arg quits the *xref* buffer. X-Git-Tag: emacs-28.0.90~5147 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ad29bc74ca9d4e1768698d4002b49c234624e359;p=emacs.git * lisp/progmodes/xref.el (xref-goto-xref): Prefix arg quits the *xref* buffer. (bug#44611) --- diff --git a/etc/NEWS b/etc/NEWS index 0f7b64ddd16..7aa54882508 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1134,6 +1134,13 @@ project's root directory, respectively. +++ *** New user option 'project-list-file'. +** xref + +--- +*** Prefix arg of 'xref-goto-xref' quits the *xref* buffer. +So typing 'C-u RET' in the *xref* buffer quits its window +before navigating to the selected location. + ** json.el --- diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index a1c4c08c263..e1dd6e56bbf 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -600,9 +600,9 @@ SELECT is `quit', also quit the *xref* window." (defun xref-goto-xref (&optional quit) "Jump to the xref on the current line and select its window. -Non-interactively, non-nil QUIT means to first quit the *xref* -buffer." - (interactive) +Non-interactively, non-nil QUIT, or interactively, with prefix argument +means to first quit the *xref* buffer." + (interactive "P") (let* ((buffer (current-buffer)) (xref (or (xref--item-at-point) (user-error "No reference at point")))