]> git.eshelyaron.com Git - emacs.git/commitdiff
Fontify CPP expressions correctly when starting in the middle of such a
authorAlan Mackenzie <acm@muc.de>
Sat, 20 Aug 2011 14:54:21 +0000 (14:54 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 20 Aug 2011 14:54:21 +0000 (14:54 +0000)
construct.  Mainly for when jit-lock etc. starts a chunk here.

cc-fonts.el (c-font-lock-context): new buffer local variable.
(c-make-font-lock-search-form): new function, extracted from
c-make-font-lock-search-function.
(c-make-font-lock-search-function): Use the above function.
(c-make-font-lock-context-search-function): New function.
(c-cpp-matchers): Enhance the preprocessor expression case with the above
function
(c-font-lock-complex-decl-prepare):  Test for being in a CPP form which
takes an expression.

cc-langs.el (c-cpp-expr-intro-re): New lang-variable.

lisp/ChangeLog

index f2a41ec16d1d60cbc8a3a41198015a3edf139550..f47ff5f1d0e9fbfc02cf8ed9296e9f967a300ae8 100644 (file)
@@ -1,3 +1,22 @@
+2011-08-20  Alan Mackenzie  <acm@muc.de>
+
+       * Fontify CPP expressions correctly when starting in the middle of
+       such a construct.  Mainly for when jit-lock etc. starts a chunk
+       here.
+
+       * progmodes/cc-fonts.el (c-font-lock-context): new buffer local
+       variable.
+       (c-make-font-lock-search-form): new function, extracted from
+       c-make-font-lock-search-function.
+       (c-make-font-lock-search-function): Use the above function.
+       (c-make-font-lock-context-search-function): New function.
+       (c-cpp-matchers): Enhance the preprocessor expression case with
+       the above function
+       (c-font-lock-complex-decl-prepare): Test for being in a CPP form
+       which takes an expression.
+
+       * progmodes/cc-langs.el (c-cpp-expr-intro-re): New lang-variable.
+
 2011-08-20  Martin Rudalics  <rudalics@gmx.at>
 
        * window.el (display-buffer-reuse-window)