]> git.eshelyaron.com Git - emacs.git/commitdiff
(tags-query-replace): Make tags-loop-scan
authorRichard M. Stallman <rms@gnu.org>
Thu, 25 Oct 2001 15:26:46 +0000 (15:26 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 25 Oct 2001 15:26:46 +0000 (15:26 +0000)
bind case-fold-search if FROM is not all lower case.

lisp/progmodes/etags.el

index 6f46e3103a8279ea4ca307c7cad2ea9539c40867..d1e357aee5df74385c79d861f633477b51ec9785 100644 (file)
@@ -1737,12 +1737,15 @@ with the command \\[tags-loop-continue].
 See documentation of variable `tags-file-name'."
   (interactive (query-replace-read-args "Tags query replace (regexp)" t))
   (setq tags-loop-scan (list 'prog1
-                            (list 'if (list 're-search-forward
-                                            (list 'quote from) nil t)
-                                  ;; When we find a match, move back
-                                  ;; to the beginning of it so perform-replace
-                                  ;; will see it.
-                                  '(goto-char (match-beginning 0))))
+                            (list 'let
+                                  (if (not (equal from (downcase from)))
+                                      '((case-fold-search nil)))
+                                  (list 'if (list 're-search-forward
+                                                  (list 'quote from) nil t)
+                                        ;; When we find a match, move back
+                                        ;; to the beginning of it so
+                                        ;; perform-replace will see it.
+                                        '(goto-char (match-beginning 0)))))
        tags-loop-operate (list 'perform-replace
                                (list 'quote from) (list 'quote to)
                                t t (list 'quote delimited)))