[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a516e69: xref-show-definitions-completing-read: Default to the fi
From: |
Dmitry Gutov |
Subject: |
master a516e69: xref-show-definitions-completing-read: Default to the first location |
Date: |
Fri, 1 Jan 2021 08:18:49 -0500 (EST) |
branch: master
commit a516e6986383b8fd0b840cd2e18ac3212bf2550d
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
xref-show-definitions-completing-read: Default to the first location
* lisp/progmodes/xref.el (xref-show-definitions-completing-read):
Default to the first location.
---
lisp/progmodes/xref.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 04798de..29e7b68 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -1057,9 +1057,12 @@ between them by typing in the minibuffer with
completion."
((eq action 'metadata)
'(metadata . ((category . xref-location))))
(t
- (complete-with-action action collection string
pred))))))
+ (complete-with-action action collection string
pred)))))
+ (def (caar collection)))
(cdr (assoc (completing-read "Choose definition: "
- ctable nil t)
+ ctable nil t
+ nil nil
+ def)
collection)))))
(xref-pop-to-location xref (assoc-default 'display-action alist))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a516e69: xref-show-definitions-completing-read: Default to the first location,
Dmitry Gutov <=