syntax: c: recognize some C++ header files by their Emacs modeline
For extensionless files, recognize C/C++ ones from the mode name between the -*- marks on the first line. This addresses https://savannah.gnu.org/patch/?9719. Inspired-by: Devin Hussey <husseydevin@gmail.com>master
parent
ff0e01a69e
commit
2698a2ba68
|
@ -1,6 +1,7 @@
|
||||||
## Here is an example for C/C++.
|
## Here is an example for C/C++.
|
||||||
|
|
||||||
syntax c "\.([ch](pp|xx)?|C|cc|c\+\+|cu|H|hh|ii?)$"
|
syntax c "\.([ch](pp|xx)?|C|cc|c\+\+|cu|H|hh|ii?)$"
|
||||||
|
header "-\*-.*\<C(\+\+)?((;|\s).*)?-\*-"
|
||||||
magic "^(C|C\+\+) (source|program)"
|
magic "^(C|C\+\+) (source|program)"
|
||||||
comment "//"
|
comment "//"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue