diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2002-07-18 20:36:53 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2002-07-18 20:36:53 +0000 |
commit | 16622cef5d14f0b994707bff45362da06eb50f79 (patch) | |
tree | 15fb01af314fcef741d7c0426615778e95b9beeb /generic/proof-syntax.el | |
parent | 56ccfda3f48d5ebdaf5b17269626f78514abbc46 (diff) |
Fix bug in proof-zap-commas-region (which is anyway faulty)
Diffstat (limited to 'generic/proof-syntax.el')
-rw-r--r-- | generic/proof-syntax.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/generic/proof-syntax.el b/generic/proof-syntax.el index 34dc13f2..eb873b45 100644 --- a/generic/proof-syntax.el +++ b/generic/proof-syntax.el @@ -152,17 +152,18 @@ Default is comma separated, or SEPREGEXP if set." "Remove the face of all `,' within the region (START,END). The optional argument LENGTH has no effect. It is required so that we may assign this function to `after-change-function'." - (save-excursion - (let - ((start (progn (goto-char start) (beginning-of-line) (point))) - (end (progn (goto-char end) (end-of-line) (point)))) - (goto-char start) - (while (search-forward "," end t) - (if (memq (get-char-property (- (point) 1) 'face) - (list 'proof-declaration-name-face - 'font-lock-function-name-face)) - (font-lock-unfontify-region (- (point) 1) (point)) - ))))) + (save-match-data + (save-excursion + (let + ((start (progn (goto-char start) (beginning-of-line) (point))) + (end (progn (goto-char end) (end-of-line) (point)))) + (goto-char start) + (while (search-forward "," end t) + (if (memq (get-char-property (- (point) 1) 'face) + (list 'proof-declaration-name-face + 'font-lock-function-name-face)) + (font-lock-unfontify-region (- (point) 1) (point)) + )))))) (defun proof-zap-commas-buffer () "Remove the face of all `,' in the current buffer." |