]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/xref.el (xref-goto-xref): Prefix arg quits the *xref* buffer.
authorJuri Linkov <juri@linkov.net>
Sat, 14 Nov 2020 20:36:13 +0000 (22:36 +0200)
committerJuri Linkov <juri@linkov.net>
Sat, 14 Nov 2020 20:36:13 +0000 (22:36 +0200)
(bug#44611)

etc/NEWS
lisp/progmodes/xref.el

index 0f7b64ddd16ed29e0cb1d9d1a6d329805f496dd0..7aa548825082ded399d318018cc1089096c74ee5 100644 (file)
--- 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
 
 ---
index a1c4c08c26305f1a111e7123331737b7574ccc49..e1dd6e56bbfada59af67ce7c58776deb3bbf5f9c 100644 (file)
@@ -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")))