]> git.eshelyaron.com Git - emacs.git/commitdiff
* progmodes/cc-mode.el (c-common-init): Bind temporary variables
authorChong Yidong <cyd@stupidchicken.com>
Sat, 6 Feb 2010 13:01:43 +0000 (08:01 -0500)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 6 Feb 2010 13:01:43 +0000 (08:01 -0500)
beg and end before calling c-get-state-before-change-functions.

lisp/ChangeLog
lisp/progmodes/cc-mode.el

index a3808b5a2ff55ee95a27b63cdab39826fe0a8eb7..cbada0d62c6174ad814a3c2447a3e7f94ecd56a7 100644 (file)
@@ -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.
index 9cdc0f97b5034d016916802b633df96bfa3b95ef..57f87c04b8890641143f88087328397c8abc9423 100644 (file)
@@ -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))))))