diff options
Diffstat (limited to 'lisp/progmodes/xref.el')
-rw-r--r-- | lisp/progmodes/xref.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 3cb4247b4bf..ea52befec57 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -1192,7 +1192,12 @@ definitions." (xref--prompt-p this-command)) (let ((id (completing-read - (format-prompt prompt def) + (if def + (format "%s (default %s): " + (substring prompt 0 (string-match + "[ :]+\\'" prompt)) + def) + prompt) (xref-backend-identifier-completion-table backend) nil nil nil 'xref--read-identifier-history def))) @@ -1252,19 +1257,19 @@ If sufficient information is available to determine a unique definition for IDENTIFIER, display it in the selected window. Otherwise, display the list of the possible definitions in a buffer where the user can select from the list." - (interactive (list (xref--read-identifier "Find definitions of"))) + (interactive (list (xref--read-identifier "Find definitions of: "))) (xref--find-definitions identifier nil)) ;;;###autoload (defun xref-find-definitions-other-window (identifier) "Like `xref-find-definitions' but switch to the other window." - (interactive (list (xref--read-identifier "Find definitions of"))) + (interactive (list (xref--read-identifier "Find definitions of: "))) (xref--find-definitions identifier 'window)) ;;;###autoload (defun xref-find-definitions-other-frame (identifier) "Like `xref-find-definitions' but switch to the other frame." - (interactive (list (xref--read-identifier "Find definitions of"))) + (interactive (list (xref--read-identifier "Find definitions of: "))) (xref--find-definitions identifier 'frame)) ;;;###autoload @@ -1275,7 +1280,7 @@ offering the symbol at point as the default. With prefix argument, or if `xref-prompt-for-identifier' is t, always prompt for the identifier. If `xref-prompt-for-identifier' is nil, prompt only if there's no usable symbol at point." - (interactive (list (xref--read-identifier "Find references of"))) + (interactive (list (xref--read-identifier "Find references of: "))) (xref--find-xrefs identifier 'references identifier nil)) ;;;###autoload |