aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
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