aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorStefan Monnier2005-12-16 20:07:49 +0000
committerStefan Monnier2005-12-16 20:07:49 +0000
commitf3725983e7c2abb2ad12e9509a34adbc0e2cfe0a (patch)
tree34f64380c5c06e22b5d78435dfa325c9f0537295 /lisp/progmodes
parent2a502a327197584831199210036cd01951255a5f (diff)
downloademacs-f3725983e7c2abb2ad12e9509a34adbc0e2cfe0a.tar.gz
emacs-f3725983e7c2abb2ad12e9509a34adbc0e2cfe0a.zip
(c-after-change-check-<>-operators):
After-change-functions should not clobber the match data.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/cc-engine.el45
1 files changed, 23 insertions, 22 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index c9f2b87b7f1..7f829bd26d5 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -3993,35 +3993,36 @@ comment at the start of cc-engine.el for more info."
3993 ;; 3993 ;;
3994 ;; This function might do hidden buffer changes. 3994 ;; This function might do hidden buffer changes.
3995 3995
3996 (save-excursion 3996 (save-match-data
3997 (goto-char beg) 3997 (save-excursion
3998 (when (or (looking-at "[<>]")
3999 (< (skip-chars-backward "<>") 0))
4000
4001 (goto-char beg) 3998 (goto-char beg)
4002 (c-beginning-of-current-token)
4003 (when (and (< (point) beg)
4004 (looking-at c-<>-multichar-token-regexp)
4005 (< beg (setq beg (match-end 0))))
4006 (while (progn (skip-chars-forward "^<>" beg)
4007 (< (point) beg))
4008 (c-clear-char-property (point) 'syntax-table)
4009 (forward-char))))
4010
4011 (when (< beg end)
4012 (goto-char end)
4013 (when (or (looking-at "[<>]") 3999 (when (or (looking-at "[<>]")
4014 (< (skip-chars-backward "<>") 0)) 4000 (< (skip-chars-backward "<>") 0))
4015 4001
4016 (goto-char end) 4002 (goto-char beg)
4017 (c-beginning-of-current-token) 4003 (c-beginning-of-current-token)
4018 (when (and (< (point) end) 4004 (when (and (< (point) beg)
4019 (looking-at c-<>-multichar-token-regexp) 4005 (looking-at c-<>-multichar-token-regexp)
4020 (< end (setq end (match-end 0)))) 4006 (< beg (setq beg (match-end 0))))
4021 (while (progn (skip-chars-forward "^<>" end) 4007 (while (progn (skip-chars-forward "^<>" beg)
4022 (< (point) end)) 4008 (< (point) beg))
4023 (c-clear-char-property (point) 'syntax-table) 4009 (c-clear-char-property (point) 'syntax-table)
4024 (forward-char))))))) 4010 (forward-char))))
4011
4012 (when (< beg end)
4013 (goto-char end)
4014 (when (or (looking-at "[<>]")
4015 (< (skip-chars-backward "<>") 0))
4016
4017 (goto-char end)
4018 (c-beginning-of-current-token)
4019 (when (and (< (point) end)
4020 (looking-at c-<>-multichar-token-regexp)
4021 (< end (setq end (match-end 0))))
4022 (while (progn (skip-chars-forward "^<>" end)
4023 (< (point) end))
4024 (c-clear-char-property (point) 'syntax-table)
4025 (forward-char))))))))
4025 4026
4026;; Dynamically bound variable that instructs `c-forward-type' to also 4027;; Dynamically bound variable that instructs `c-forward-type' to also
4027;; treat possible types (i.e. those that it normally returns 'maybe or 4028;; treat possible types (i.e. those that it normally returns 'maybe or