xref-show-definitions-completing-read: Default to the first location
* lisp/progmodes/xref.el (xref-show-definitions-completing-read): Default to the first location.
This commit is contained in:
parent
3ea7cec4c0
commit
a516e69863
1 changed files with 5 additions and 2 deletions
|
@ -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))))
|
||||
|
|
Loading…
Add table
Reference in a new issue