mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
project-find-regexp: Default to symbol at point
* lisp/progmodes/project.el (project--read-regexp): Don't rely on the Xref backend to provide the default value.
This commit is contained in:
parent
aed9584a0e
commit
bb8f46d55b
1 changed files with 2 additions and 3 deletions
|
|
@ -389,7 +389,6 @@ DIRS must contain directory names."
|
|||
|
||||
(declare-function grep-read-files "grep")
|
||||
(declare-function xref--show-xrefs "xref")
|
||||
(declare-function xref-backend-identifier-at-point "xref")
|
||||
(declare-function xref--find-ignores-arguments "xref")
|
||||
(declare-function xref--regexp-to-extended "xref")
|
||||
(declare-function xref--convert-hits "xref")
|
||||
|
|
@ -506,8 +505,8 @@ pattern to search for."
|
|||
(delete-file infile)))))
|
||||
|
||||
(defun project--read-regexp ()
|
||||
(let ((id (xref-backend-identifier-at-point (xref-find-backend))))
|
||||
(read-regexp "Find regexp" (and id (regexp-quote id)))))
|
||||
(let ((sym (thing-at-point 'symbol)))
|
||||
(read-regexp "Find regexp" (and sym (regexp-quote sym)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun project-find-file ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue