From dfb360fb00cb877302f8881114d63efc1b01e54d Mon Sep 17 00:00:00 2001
From: "Kenneth Benzie (Benie)" <k.benzie83@gmail.com>
Date: Wed, 26 Jul 2017 00:30:13 +0100
Subject: [PATCH] Obey cpp options in c syntax file

---
 after/syntax/c.vim | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/after/syntax/c.vim b/after/syntax/c.vim
index fd5b0f5..74c06a3 100644
--- a/after/syntax/c.vim
+++ b/after/syntax/c.vim
@@ -1,7 +1,7 @@
 " Language: C
 " Description: Additional C syntax file.
 
-if !exists('c_no_function')
+if !exists('c_no_function') && !exists('cpp_no_function')
   " Match function expressions: expr()
   "                             ^^^^
   syn match cFunction '\h\w*\ze\s*(' display
@@ -9,7 +9,7 @@ if !exists('c_no_function')
   hi default link cFunction Function
 endif
 
-if !exists('c_no_delimiters')
+if !exists('c_no_delimiters') && !exists('cpp_no_delimiters')
   " Match delimiter expressions: (expr) {expr} ;
   "                              ^    ^ ^    ^ ^
   syn match cDelimiter '[()\[\];:]' display
@@ -21,7 +21,7 @@ if !exists('c_no_delimiters')
   hi default link cDelimiter cUserCont
 endif
 
-if !exists('c_no_operators')
+if !exists('c_no_operators') && !exists('cpp_no_operators')
   " Match: * - . ^ ~ + - , & | ! % ? < > order is important
   "        ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
   syn match cOperator '[\*=\.\^\~+\-,&|!%?><]' display