Commit e418e910 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

Allow rgrep users to indicate case folding easier

* lisp/progmodes/grep.el (rgrep): Allow the user to toggle case
sensitivity interactively (bug#16913).
parent 027fecb2
Pipeline #18480 failed with stages
in 7 minutes and 39 seconds
......@@ -1205,7 +1205,11 @@ When called programmatically and FILES is nil, REGEXP is expected
to specify a command to run.
If CONFIRM is non-nil, the user will be given an opportunity to edit the
command before it's run."
command before it's run.
Interactively, the user can use the `M-c' command while entering
the regexp to indicate whether the grep should be case sensitive
or not."
......@@ -1233,7 +1237,8 @@ command before it's run."
(compilation-start regexp #'grep-mode))
(setq dir (file-name-as-directory (expand-file-name dir)))
(let ((command (rgrep-default-command regexp files nil)))
(let* ((case-fold-search (read-regexp-case-fold-search regexp))
(command (rgrep-default-command regexp files nil)))
(when command
(if confirm
(setq command
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment