changeset 107098:17f07853dd4d

* progmodes/cc-mode.el (c-common-init): Bind temporary variables beg and end before calling c-get-state-before-change-functions.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 06 Feb 2010 08:01:43 -0500
parents 6692a4cd2966
children 6d6a455af77b
files lisp/ChangeLog lisp/progmodes/cc-mode.el
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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  <cyd@stupidchicken.com>
+
+	* 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  <dann@ics.uci.edu>
 
 	* vc-bzr.el (vc-bzr-dir-extra-headers): Disable the pending merges header.
--- 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))))))