aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
authorDavid Aspinall2009-09-04 17:26:07 +0000
committerDavid Aspinall2009-09-04 17:26:07 +0000
commit907eb765675d2f18914f7faed9a55b8c73f60d76 (patch)
treee173f0324981459f37c1f5b831413121a8f1c3b7 /generic
parentc7b40f33e0f02b902e129ace1c6ed83795a7dc85 (diff)
Alternative implementation of pg-remove-specials which does not introduce restriction.
Diffstat (limited to 'generic')
-rw-r--r--generic/proof-utils.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el
index 53afcb5e..98fb6e99 100644
--- a/generic/proof-utils.el
+++ b/generic/proof-utils.el
@@ -324,12 +324,12 @@ The argument KBL is a list of tuples (k . f) where `k' is a keybinding
(defun pg-remove-specials (&optional start 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))
- (goto-char (or start (point-min)))
+ (let ((start (or start (point-min)))
+ (end (or end (point-max))))
+ (goto-char start)
(while (re-search-forward pg-special-char-regexp end t)
- (replace-match ""))))
+ (replace-match ""))
+ (goto-char end)))
(defun pg-remove-specials-in-string (string)
(proof-replace-regexp-in-string pg-special-char-regexp "" string))