diff options
| -rw-r--r-- | lisp/progmodes/project.el | 5 | ||||
| -rw-r--r-- | lisp/progmodes/xref.el | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 398339ee590..40d7e03baf4 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -213,6 +213,7 @@ DIRS must contain directory names." | |||
| 213 | (declare-function grep-read-files "grep") | 213 | (declare-function grep-read-files "grep") |
| 214 | (declare-function xref-collect-matches "xref") | 214 | (declare-function xref-collect-matches "xref") |
| 215 | (declare-function xref--show-xrefs "xref") | 215 | (declare-function xref--show-xrefs "xref") |
| 216 | (declare-function xref-backend-identifier-at-point "xref") | ||
| 216 | 217 | ||
| 217 | ;;;###autoload | 218 | ;;;###autoload |
| 218 | (defun project-find-regexp (regexp) | 219 | (defun project-find-regexp (regexp) |
| @@ -240,10 +241,8 @@ pattern to search for." | |||
| 240 | (project--find-regexp-in dirs regexp pr))) | 241 | (project--find-regexp-in dirs regexp pr))) |
| 241 | 242 | ||
| 242 | (defun project--read-regexp () | 243 | (defun project--read-regexp () |
| 243 | (defvar xref-identifier-at-point-function) | ||
| 244 | (require 'xref) | ||
| 245 | (read-regexp "Find regexp" | 244 | (read-regexp "Find regexp" |
| 246 | (funcall xref-identifier-at-point-function))) | 245 | (xref-backend-identifier-at-point (xref-find-backend)))) |
| 247 | 246 | ||
| 248 | (defun project--find-regexp-in (dirs regexp project) | 247 | (defun project--find-regexp-in (dirs regexp project) |
| 249 | (require 'grep) | 248 | (require 'grep) |
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 7e3b5600f1a..40f8d23c64a 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el | |||
| @@ -210,6 +210,7 @@ and should return either nil to mean that it is not applicable, | |||
| 210 | or an xref backend, which is a value to be used to dispatch the | 210 | or an xref backend, which is a value to be used to dispatch the |
| 211 | generic functions.") | 211 | generic functions.") |
| 212 | 212 | ||
| 213 | ;;;###autoload | ||
| 213 | (defun xref-find-backend () | 214 | (defun xref-find-backend () |
| 214 | (run-hook-with-args-until-success 'xref-backend-functions)) | 215 | (run-hook-with-args-until-success 'xref-backend-functions)) |
| 215 | 216 | ||