# HG changeset patch # User Chong Yidong # Date 1265461303 18000 # Node ID 17f07853dd4dd836987ef64be430f2b118788759 # Parent 6692a4cd2966eab67bbec49fcbcc8838a66614e5 * progmodes/cc-mode.el (c-common-init): Bind temporary variables beg and end before calling c-get-state-before-change-functions. diff -r 6692a4cd2966 -r 17f07853dd4d lisp/ChangeLog --- a/lisp/ChangeLog Fri Feb 05 20:23:59 2010 -0800 +++ b/lisp/ChangeLog Sat Feb 06 08:01:43 2010 -0500 @@ -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 -r 6692a4cd2966 -r 17f07853dd4d lisp/progmodes/cc-mode.el --- a/lisp/progmodes/cc-mode.el Fri Feb 05 20:23:59 2010 -0800 +++ b/lisp/progmodes/cc-mode.el Sat Feb 06 08:01:43 2010 -0500 @@ -642,9 +642,11 @@ (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))))))