[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-engine.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-engine.el |
Date: |
Fri, 16 Dec 2005 20:07:40 +0000 |
Index: emacs/lisp/progmodes/cc-engine.el
diff -u emacs/lisp/progmodes/cc-engine.el:1.44
emacs/lisp/progmodes/cc-engine.el:1.45
--- emacs/lisp/progmodes/cc-engine.el:1.44 Fri Dec 2 12:30:35 2005
+++ emacs/lisp/progmodes/cc-engine.el Fri Dec 16 20:07:40 2005
@@ -3993,35 +3993,36 @@
;;
;; This function might do hidden buffer changes.
- (save-excursion
- (goto-char beg)
- (when (or (looking-at "[<>]")
- (< (skip-chars-backward "<>") 0))
-
+ (save-match-data
+ (save-excursion
(goto-char beg)
- (c-beginning-of-current-token)
- (when (and (< (point) beg)
- (looking-at c-<>-multichar-token-regexp)
- (< beg (setq beg (match-end 0))))
- (while (progn (skip-chars-forward "^<>" beg)
- (< (point) beg))
- (c-clear-char-property (point) 'syntax-table)
- (forward-char))))
-
- (when (< beg end)
- (goto-char end)
(when (or (looking-at "[<>]")
(< (skip-chars-backward "<>") 0))
- (goto-char end)
+ (goto-char beg)
(c-beginning-of-current-token)
- (when (and (< (point) end)
+ (when (and (< (point) beg)
(looking-at c-<>-multichar-token-regexp)
- (< end (setq end (match-end 0))))
- (while (progn (skip-chars-forward "^<>" end)
- (< (point) end))
+ (< beg (setq beg (match-end 0))))
+ (while (progn (skip-chars-forward "^<>" beg)
+ (< (point) beg))
(c-clear-char-property (point) 'syntax-table)
- (forward-char)))))))
+ (forward-char))))
+
+ (when (< beg end)
+ (goto-char end)
+ (when (or (looking-at "[<>]")
+ (< (skip-chars-backward "<>") 0))
+
+ (goto-char end)
+ (c-beginning-of-current-token)
+ (when (and (< (point) end)
+ (looking-at c-<>-multichar-token-regexp)
+ (< end (setq end (match-end 0))))
+ (while (progn (skip-chars-forward "^<>" end)
+ (< (point) end))
+ (c-clear-char-property (point) 'syntax-table)
+ (forward-char))))))))
;; Dynamically bound variable that instructs `c-forward-type' to also
;; treat possible types (i.e. those that it normally returns 'maybe or