From ffe87109ce3fb6f9d31e2e88e2e22f4737b16540 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 6 Feb 2010 08:01:43 -0500 Subject: [PATCH] * progmodes/cc-mode.el (c-common-init): Bind temporary variables beg and end before calling c-get-state-before-change-functions. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/cc-mode.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a3808b5a2ff..cbada0d62c6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-02-06 Chong Yidong + + * progmodes/cc-mode.el (c-common-init): Bind temporary variables + beg and end before calling c-get-state-before-change-functions. + 2010-02-06 Dan Nicolaescu * vc-bzr.el (vc-bzr-dir-extra-headers): Disable the pending merges header. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 9cdc0f97b50..57f87c04b88 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -642,9 +642,11 @@ compatible with old code; callers should always specify it." (widen) (save-excursion (if c-get-state-before-change-functions - (mapc (lambda (fn) - (funcall fn beg end)) - c-get-state-before-change-functions)) + (let ((beg (point-min)) + (end (point-max))) + (mapc (lambda (fn) + (funcall fn beg end)) + c-get-state-before-change-functions))) (if c-before-font-lock-function (funcall c-before-font-lock-function (point-min) (point-max) (- (point-max) (point-min)))))) -- 2.39.2