From: Chong Yidong Date: Sat, 6 Feb 2010 13:01:43 +0000 (-0500) Subject: * progmodes/cc-mode.el (c-common-init): Bind temporary variables X-Git-Tag: emacs-pretest-23.1.93~98 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ffe87109ce3fb6f9d31e2e88e2e22f4737b16540;p=emacs.git * progmodes/cc-mode.el (c-common-init): Bind temporary variables beg and end before calling c-get-state-before-change-functions. --- 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))))))