From 4e559f22a00b38e067cde7863635c96d8790e4b3 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Mon, 18 Jan 2016 22:12:44 +0300 Subject: [PATCH] * lisp/progmodes/project.el (project--read-regexp): Quote the identifier. --- lisp/progmodes/project.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index a972def24b0..85f390746d9 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -264,7 +264,6 @@ DIRS must contain directory names." (symbol-value var))) (declare-function grep-read-files "grep") -(declare-function xref-collect-matches "xref") (declare-function xref--show-xrefs "xref") (declare-function xref-backend-identifier-at-point "xref") (declare-function xref--find-ignores-arguments "xref") @@ -295,8 +294,8 @@ pattern to search for." (project--find-regexp-in dirs regexp pr))) (defun project--read-regexp () - (read-regexp "Find regexp" - (xref-backend-identifier-at-point (xref-find-backend)))) + (let ((id (xref-backend-identifier-at-point (xref-find-backend)))) + (read-regexp "Find regexp" (and id (regexp-quote id))))) (defun project--find-regexp-in (dirs regexp project) (require 'grep) -- 2.39.2