diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/vc/vc-git.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 96c2f38af42..69d62957026 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -179,6 +179,14 @@ Should be consistent with the Git config value i18n.logOutputEncoding." :type '(coding-system :tag "Coding system to decode Git log output") :version "25.1") +(defcustom vc-git-grep-template "git --no-pager grep -n -e <R> -- <F>" + "The default command to run for \\[vc-git-grep]. +The following place holders should be present in the string: + <F> - file names and wildcards to search. + <R> - the regular expression searched for." + :type 'string + :version "27.1") + ;; History of Git commands. (defvar vc-git-history nil) @@ -1449,7 +1457,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]." (setq command nil)) (setq dir (file-name-as-directory (expand-file-name dir))) (setq command - (grep-expand-template "git --no-pager grep -n -e <R> -- <F>" + (grep-expand-template vc-git-grep-template regexp files)) (when command (if (equal current-prefix-arg '(4)) |