aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic
diff options
context:
space:
mode:
authorGravatar Makarius Wenzel <makarius@sketis.net>2005-09-01 14:18:08 +0000
committerGravatar Makarius Wenzel <makarius@sketis.net>2005-09-01 14:18:08 +0000
commit677cd9da3adce2be73e8a6a02b414ffcff54d003 (patch)
treeb5fe58e697c5c71d50261bc24520a8dc01fbc00d /generic
parentf1328797b3efbc1163e57ed02528fbf209089bc6 (diff)
moved pg-special-char-regexp to proof-config.el;
added pg-remove-specials-in-string;
Diffstat (limited to 'generic')
-rw-r--r--generic/proof-utils.el12
1 files changed, 5 insertions, 7 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el
index e8bfa911..280de2d6 100644
--- a/generic/proof-utils.el
+++ b/generic/proof-utils.el
@@ -460,14 +460,9 @@ Returns new END value."
(proof-x-symbol-decode-region start end))
(proof-font-lock-clear-font-lock-vars)))
-
-(defconst pg-special-char-regexp "[\200-\377]"
- "Regexp matching any \"special\" character (top bit set).")
-
-
(defun pg-remove-specials (&optional start end)
- "Remove special characters (with top bit set) in region.
-Default to whole buffer. Leave point at END."
+ "Remove special characters in region. Default to whole buffer.
+Leave point at END."
(save-restriction
(if (and start end)
(narrow-to-region start end))
@@ -475,6 +470,9 @@ Default to whole buffer. Leave point at END."
(proof-replace-regexp pg-special-char-regexp "")
(goto-char (point-max))))
+(defun pg-remove-specials-in-string (string)
+ (proof-replace-regexp-in-string pg-special-char-regexp "" string))
+
;; FIXME todo: add toggle for fontify region which turns it on/off