From c2c3a05deb42b36fd50ec196acd0d505a10b39cf Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 25 Oct 2001 15:26:46 +0000 Subject: [PATCH] (tags-query-replace): Make tags-loop-scan bind case-fold-search if FROM is not all lower case. --- lisp/progmodes/etags.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 6f46e3103a8..d1e357aee5d 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -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))) -- 2.39.5