[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 4e559f2 2/2: * lisp/progmodes/project.el (project
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] emacs-25 4e559f2 2/2: * lisp/progmodes/project.el (project--read-regexp): Quote the identifier. |
Date: |
Mon, 18 Jan 2016 19:14:36 +0000 |
branch: emacs-25
commit 4e559f22a00b38e067cde7863635c96d8790e4b3
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
* lisp/progmodes/project.el (project--read-regexp): Quote the identifier.
---
lisp/progmodes/project.el | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index a972def..85f3907 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)