diff options
| author | David Aspinall | 2007-05-10 21:17:45 +0000 |
|---|---|---|
| committer | David Aspinall | 2007-05-10 21:17:45 +0000 |
| commit | e6a2fe06d46ac9c4400e9e8f6bf974680a67e3f2 (patch) | |
| tree | 3ac3e6cc2ed33e6a27c99e3ca512f6d31a833116 /generic/proof-syntax.el | |
| parent | 82ed0297bdddb7b652a7e3f17fbb183dba601dfa (diff) | |
Add proof-replace-regexp-nocasefold
Diffstat (limited to 'generic/proof-syntax.el')
| -rw-r--r-- | generic/proof-syntax.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/proof-syntax.el b/generic/proof-syntax.el index 03bd7b00..4fa9a6c3 100644 --- a/generic/proof-syntax.el +++ b/generic/proof-syntax.el @@ -123,15 +123,20 @@ If so, return non-nil." ;; Replacing matches (defun proof-replace-string (string to-string) - "Non-interactive version of `replace-string', which see." + "Non-interactive `replace-string', using `proof-case-fold-search'." (while (proof-search-forward string nil t) (replace-match to-string nil t))) (defun proof-replace-regexp (regexp to-string) - "Non-interactive version of `replace-regexp', which see." + "Non-interactive `replace-regexp', using `proof-case-fold-search'." (while (proof-re-search-forward regexp nil t) (replace-match to-string nil nil))) +(defun proof-replace-regexp-nocasefold (regexp to-string) + "Non-interactive `replace-regexp', forcing `case-fold-search' to nil." + (let ((case-fold-search nil)) + (while (proof-re-search-forward regexp nil t) + (replace-match to-string nil nil)))) ;; Generic font-lock |
