aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2020-11-14 22:36:13 +0200
committerJuri Linkov2020-11-14 22:36:13 +0200
commitad29bc74ca9d4e1768698d4002b49c234624e359 (patch)
treec42158473818310fe0bf35df67e083caa2edf0e8
parent844e82f5a837a16c64e32ff9dd41a9e9b3ad3432 (diff)
downloademacs-ad29bc74ca9d4e1768698d4002b49c234624e359.tar.gz
emacs-ad29bc74ca9d4e1768698d4002b49c234624e359.zip
* lisp/progmodes/xref.el (xref-goto-xref): Prefix arg quits the *xref* buffer.
(bug#44611)
-rw-r--r--etc/NEWS7
-rw-r--r--lisp/progmodes/xref.el6
2 files changed, 10 insertions, 3 deletions
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.
1134+++ 1134+++
1135*** New user option 'project-list-file'. 1135*** New user option 'project-list-file'.
1136 1136
1137** xref
1138
1139---
1140*** Prefix arg of 'xref-goto-xref' quits the *xref* buffer.
1141So typing 'C-u RET' in the *xref* buffer quits its window
1142before navigating to the selected location.
1143
1137** json.el 1144** json.el
1138 1145
1139--- 1146---
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."
600 600
601(defun xref-goto-xref (&optional quit) 601(defun xref-goto-xref (&optional quit)
602 "Jump to the xref on the current line and select its window. 602 "Jump to the xref on the current line and select its window.
603Non-interactively, non-nil QUIT means to first quit the *xref* 603Non-interactively, non-nil QUIT, or interactively, with prefix argument
604buffer." 604means to first quit the *xref* buffer."
605 (interactive) 605 (interactive "P")
606 (let* ((buffer (current-buffer)) 606 (let* ((buffer (current-buffer))
607 (xref (or (xref--item-at-point) 607 (xref (or (xref--item-at-point)
608 (user-error "No reference at point"))) 608 (user-error "No reference at point")))