GNU bug report logs - #44611
Prefix arg for xref-goto-xref

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Fri, 13 Nov 2020 08:33:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Prefix arg for xref-goto-xref
Date: Fri, 13 Nov 2020 10:18:51 +0200
I recall endless discussions about xref in the past.
But now I realized that xref-goto-xref just misses
an obvious thing, and nothing more is needed.

Like e.g. 'quit-window' allows using a prefix argument
to change its behavior by relying on (interactive "P"),
xref-goto-xref should do the same:

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index a1c4c08c26..e1dd6e56bb 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -600,9 +600,9 @@ xref--item-at-point
 
 (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")))




This bug report was last modified 4 years and 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.