aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic/proof-syntax.el
diff options
context:
space:
mode:
Diffstat (limited to 'generic/proof-syntax.el')
-rw-r--r--generic/proof-syntax.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/generic/proof-syntax.el b/generic/proof-syntax.el
index 77fd63c1..34dc13f2 100644
--- a/generic/proof-syntax.el
+++ b/generic/proof-syntax.el
@@ -105,6 +105,20 @@ If so, return non-nil."
(proof-looking-at-safe proof-string-start-regexp)))
+
+;; Replacing matches
+
+(defun proof-replace-string (string to-string)
+ "Non-interactive version of `replace-string', which see."
+ (while (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."
+ (while (re-search-forward regexp nil t)
+ (replace-match to-string nil nil)))
+
+
;; Generic font-lock
(defvar proof-id "\\(\\w\\(\\w\\|\\s_\\)*\\)"