emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master e418e91091 3/3: Allow rgrep users to indicate case folding easier


From: Lars Ingebrigtsen
Subject: master e418e91091 3/3: Allow rgrep users to indicate case folding easier
Date: Mon, 13 Jun 2022 09:33:20 -0400 (EDT)

branch: master
commit e418e9109140bba06b03a9ea5f1dec9f7aa541a3
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Allow rgrep users to indicate case folding easier
    
    * lisp/progmodes/grep.el (rgrep): Allow the user to toggle case
    sensitivity interactively (bug#16913).
---
 lisp/progmodes/grep.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index a8d743b87a..4dedbc66ae 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -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."
   (interactive
    (progn
      (grep-compute-defaults)
@@ -1233,7 +1237,8 @@ command before it's run."
                                   grep-find-command)))
            (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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]