From 0de3da9f2fdaa4259a3b53bb2faf96ee7109f51c Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Wed, 11 Apr 2012 15:32:30 +0000 Subject: [PATCH] Correct two search limits in c-before-change-check_<>-operators. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/cc-engine.el | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fdd3919b13b..cde248a979e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-04-11 Alan Mackenzie + + * progmodes/cc-engine.el (c-before-change-check-<>-operators): + Correct two search limits. + 2012-04-10 Stefan Monnier * startup.el (command-line-1): Inhibit splash from daemon (bug#10996). diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index cf38001c123..65e28c11e21 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -5382,7 +5382,7 @@ comment at the start of cc-engine.el for more info." new-beg new-end need-new-beg need-new-end) ;; Locate the barrier before the changed region (goto-char (if beg-lit-limits (car beg-lit-limits) beg)) - (c-syntactic-skip-backward "^;{}" (max (- beg 2048) (point-min))) + (c-syntactic-skip-backward "^;{}" (c-determine-limit 512)) (setq new-beg (point)) ;; Remove the syntax-table properties from each pertinent <...> pair. @@ -5393,8 +5393,7 @@ comment at the start of cc-engine.el for more info." ;; Locate the barrier after END. (goto-char (if end-lit-limits (cdr end-lit-limits) end)) - (c-syntactic-re-search-forward "[;{}]" - (min (+ end 2048) (point-max)) 'end) + (c-syntactic-re-search-forward "[;{}]" (c-determine-+ve-limit 512) 'end) (setq new-end (point)) ;; Remove syntax-table properties from the remaining pertinent <...> -- 2.11.4.GIT