diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2009-09-09 21:09:41 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2009-09-09 21:09:41 +0000 |
commit | 89ec8b4c594135ab2ccc7bb3105a81fd3d4672be (patch) | |
tree | 18ee04c512038789bc6abf5dc44de7c2dc5b789e /generic/proof-syntax.el | |
parent | f5cf54710cb0d72eba35a59b1a3e86fb0c56473b (diff) |
Add proof-re-search-forward-safe
Diffstat (limited to 'generic/proof-syntax.el')
-rw-r--r-- | generic/proof-syntax.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/proof-syntax.el b/generic/proof-syntax.el index 50ef90b1..bfa7b6e4 100644 --- a/generic/proof-syntax.el +++ b/generic/proof-syntax.el @@ -68,6 +68,12 @@ nil if a region cannot be found." (let ((case-fold-search proof-case-fold-search)) (re-search-backward regexp bound noerror count))) +(defsubst proof-re-search-forward-safe (regexp &optional bound noerror count) + "Like re-search-forward, but set case-fold-search to proof-case-fold-search." + (and regexp + (let ((case-fold-search proof-case-fold-search)) + (re-search-forward regexp bound noerror count)))) + (defsubst proof-string-match (regexp string &optional start) "Like string-match, but set case-fold-search to proof-case-fold-search." (let ((case-fold-search proof-case-fold-search)) |