From: Alan Mackenzie Date: Tue, 19 Oct 2010 20:18:35 +0000 (+0000) Subject: cc-mode.el (c-before-change, c-after-change): Move the setting of X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~559 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ba7fdf303b53766521c86dffb2cafb8d80f91bdb;p=emacs.git cc-mode.el (c-before-change, c-after-change): Move the setting of c-new-BEG and c-new-END from c-before-change to c-after-change. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 14691b44373..4aa0ead72b4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-10-19 Alan Mackenzie + + * progmodes/cc-mode.el (c-before-change, c-after-change): Move the + setting of c-new-BEG and c-new-END from c-before-change to + c-after-change. + 2010-10-19 Chong Yidong * cus-face.el (custom-theme-set-faces): Revert 2010-10-18 change. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 505a5663ebc..9524ff27d24 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1029,10 +1029,6 @@ Note that the style variables are always made local to the buffer." (buffer-substring-no-properties type-pos term-pos) (buffer-substring-no-properties beg end))))))) - ;; (c-new-BEG c-new-END) will be the region to fontify. It may become - ;; larger than (beg end). - (setq c-new-BEG beg - c-new-END end) (if c-get-state-before-change-functions (mapc (lambda (fn) (funcall fn beg end)) @@ -1086,6 +1082,10 @@ Note that the style variables are always made local to the buffer." (when c-recognize-<>-arglists (c-after-change-check-<>-operators beg end)) + ;; (c-new-BEG c-new-END) will be the region to fontify. It may become + ;; larger than (beg end). + (setq c-new-BEG beg + c-new-END end) (if c-before-font-lock-function (save-excursion (funcall c-before-font-lock-function beg end old-len)))))))