emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ad29bc7: * lisp/progmodes/xref.el (xref-goto-xref): Prefix arg qu


From: Juri Linkov
Subject: master ad29bc7: * lisp/progmodes/xref.el (xref-goto-xref): Prefix arg quits the *xref* buffer.
Date: Sat, 14 Nov 2020 15:36:26 -0500 (EST)

branch: master
commit ad29bc74ca9d4e1768698d4002b49c234624e359
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/progmodes/xref.el (xref-goto-xref): Prefix arg quits the *xref* 
buffer.
    
    (bug#44611)
---
 etc/NEWS               | 7 +++++++
 lisp/progmodes/xref.el | 6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 0f7b64d..7aa5488 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 a1c4c08..e1dd6e5 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")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]