From: Juri Linkov Date: Mon, 29 Mar 2021 19:34:51 +0000 (+0300) Subject: * lisp/progmodes/project.el (project-regexp-history-variable): New variable. X-Git-Tag: emacs-28.0.90~3093 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b6552b1d7c5e6eb66b7b641efa3a0fe175fb7eba;p=emacs.git * lisp/progmodes/project.el (project-regexp-history-variable): New variable. (project--read-regexp): Use it as HISTORY arg of 'read-regexp' with 'grep-regexp-history' default (bug#47012). --- diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index f1546541d54..4101962f06a 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -782,9 +782,12 @@ pattern to search for." (user-error "No matches for: %s" regexp)) xrefs)) +(defvar project-regexp-history-variable 'grep-regexp-history) + (defun project--read-regexp () (let ((sym (thing-at-point 'symbol t))) - (read-regexp "Find regexp" (and sym (regexp-quote sym))))) + (read-regexp "Find regexp" (and sym (regexp-quote sym)) + project-regexp-history-variable))) ;;;###autoload (defun project-find-file ()