emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 23bb07e: Fix the CC Mode fixes from 2015-03-30. Fix


From: Alan Mackenzie
Subject: [Emacs-diffs] master 23bb07e: Fix the CC Mode fixes from 2015-03-30. Fixes debbugs#20240.
Date: Wed, 01 Apr 2015 19:15:06 +0000

branch: master
commit 23bb07e05de2266d02f2f47e2de99e5c96e995f9
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    Fix the CC Mode fixes from 2015-03-30.  Fixes debbugs#20240.
    
    * progmodes/cc-mode.el (c-extend-after-change-region): Widen before
    applying text properties.
    * progmodes/cc-langs.el (c-before-font-lock-functions): Update an entry
    to a new function name.
---
 lisp/ChangeLog             |    9 +++++++++
 lisp/progmodes/cc-langs.el |    2 +-
 lisp/progmodes/cc-mode.el  |   10 ++++++----
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 46f519e..2092447 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
+2015-04-01  Alan Mackenzie  <address@hidden>
+
+       Fix the CC Mode fixes from 2015-03-30.  Fixes debbugs#20240.
+
+       * progmodes/cc-mode.el (c-extend-after-change-region): Widen
+       before applying text properties.
+       * progmodes/cc-langs.el (c-before-font-lock-functions): Update an
+       entry to a new function name.
+
 2015-04-01  Paul Eggert  <address@hidden>
 
        * emacs-lisp/package.el: Spelling fixes and use active voice.
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index c7b24e1..ee5a5a6 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -495,7 +495,7 @@ parameters \(point-min) and \(point-max).")
 (c-lang-defconst c-before-font-lock-functions
   ;; For documentation see the following c-lang-defvar of the same name.
   ;; The value here may be a list of functions or a single function.
-  t 'c-change-set-fl-decl-start
+  t 'c-change-expand-fl-region
   (c c++ objc) '(c-neutralize-syntax-in-and-mark-CPP
                 c-change-expand-fl-region)
   awk 'c-awk-extend-and-syntax-tablify-region)
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index c95e8a9..d88fe70 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1330,10 +1330,12 @@ This function is called from `c-common-init', once per 
mode initialization."
   ;; (the languages with #define) and AWK Mode make non-null use of this
   ;; function.
   (when (eq font-lock-support-mode 'jit-lock-mode)
-    (if (< c-new-BEG beg)
-       (put-text-property c-new-BEG beg 'fontified nil))
-    (if (> c-new-END end)
-       (put-text-property end c-new-END 'fontified nil)))
+    (save-restriction
+      (widen)
+      (if (< c-new-BEG beg)
+         (put-text-property c-new-BEG beg 'fontified nil))
+      (if (> c-new-END end)
+         (put-text-property end c-new-END 'fontified nil))))
   (cons c-new-BEG c-new-END))
 
 ;; Emacs < 22 and XEmacs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]