diff options
| author | David Aspinall | 2009-09-04 17:26:07 +0000 |
|---|---|---|
| committer | David Aspinall | 2009-09-04 17:26:07 +0000 |
| commit | 907eb765675d2f18914f7faed9a55b8c73f60d76 (patch) | |
| tree | e173f0324981459f37c1f5b831413121a8f1c3b7 /generic/proof-utils.el | |
| parent | c7b40f33e0f02b902e129ace1c6ed83795a7dc85 (diff) | |
Alternative implementation of pg-remove-specials which does not introduce restriction.
Diffstat (limited to 'generic/proof-utils.el')
| -rw-r--r-- | generic/proof-utils.el | 10 |
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)) |
