Revision: 4466 http://geany.svn.sourceforge.net/geany/?rev=4466&view=rev Author: ntrel Date: 2009-12-03 13:43:37 +0000 (Thu, 03 Dec 2009)
Log Message: ----------- Move C-like filetype properties into configuration files.
Modified Paths: -------------- trunk/ChangeLog trunk/data/filetypes.c trunk/data/filetypes.cpp trunk/data/filetypes.cs trunk/data/filetypes.glsl trunk/data/filetypes.vala trunk/src/highlighting.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-12-02 20:02:57 UTC (rev 4465) +++ trunk/ChangeLog 2009-12-03 13:43:37 UTC (rev 4466) @@ -1,3 +1,10 @@ +2009-12-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/highlighting.c, data/filetypes.cpp, data/filetypes.vala, + data/filetypes.glsl, data/filetypes.cs, data/filetypes.c: + Move C-like filetype properties into configuration files. + + 2009-12-02 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* doc/geany.txt, doc/geany.html:
Modified: trunk/data/filetypes.c =================================================================== --- trunk/data/filetypes.c 2009-12-02 20:02:57 UTC (rev 4465) +++ trunk/data/filetypes.c 2009-12-03 13:43:37 UTC (rev 4466) @@ -34,6 +34,13 @@ # these are some doxygen keywords (incomplete) docComment=attention author brief bug class code date def enum example exception file fn namespace note param remarks return see since struct throw todo typedef var version warning union
+[lexer_properties] +styling.within.preprocessor=1 +preprocessor.symbol.$(file.patterns.cpp)=# +preprocessor.start.$(file.patterns.cpp)=if ifdef ifndef +preprocessor.middle.$(file.patterns.cpp)=else elif +preprocessor.end.$(file.patterns.cpp)=endif + [settings] # default extension used when saving files #extension=c
Modified: trunk/data/filetypes.cpp =================================================================== --- trunk/data/filetypes.cpp 2009-12-02 20:02:57 UTC (rev 4465) +++ trunk/data/filetypes.cpp 2009-12-03 13:43:37 UTC (rev 4466) @@ -34,6 +34,13 @@ # these are some doxygen keywords (incomplete) docComment=attention author brief bug class code date def enum example exception file fn namespace note param remarks return see since struct throw todo typedef var version warning union
+[lexer_properties] +styling.within.preprocessor=1 +preprocessor.symbol.$(file.patterns.cpp)=# +preprocessor.start.$(file.patterns.cpp)=if ifdef ifndef +preprocessor.middle.$(file.patterns.cpp)=else elif +preprocessor.end.$(file.patterns.cpp)=endif + [settings] # default extension used when saving files #extension=cpp
Modified: trunk/data/filetypes.cs =================================================================== --- trunk/data/filetypes.cs 2009-12-02 20:02:57 UTC (rev 4465) +++ trunk/data/filetypes.cs 2009-12-03 13:43:37 UTC (rev 4466) @@ -34,6 +34,13 @@ # these are some doxygen keywords (incomplete) docComment=attention author brief bug class code date def enum example exception file fn namespace note param remarks return see since struct throw todo typedef var version warning union
+[lexer_properties] +styling.within.preprocessor=1 +preprocessor.symbol.$(file.patterns.cpp)=# +preprocessor.start.$(file.patterns.cpp)=if +preprocessor.middle.$(file.patterns.cpp)=else elif +preprocessor.end.$(file.patterns.cpp)=endif + [settings] # default extension used when saving files #extension=cs
Modified: trunk/data/filetypes.glsl =================================================================== --- trunk/data/filetypes.glsl 2009-12-02 20:02:57 UTC (rev 4465) +++ trunk/data/filetypes.glsl 2009-12-03 13:43:37 UTC (rev 4466) @@ -34,6 +34,13 @@ # these are some doxygen keywords (incomplete) docComment=attention author brief bug class code date def enum example exception file fn namespace note param remarks return returns see since struct throw todo typedef var version warning union
+[lexer_properties] +styling.within.preprocessor=1 +preprocessor.symbol.$(file.patterns.cpp)=# +preprocessor.start.$(file.patterns.cpp)=if ifdef ifndef +preprocessor.middle.$(file.patterns.cpp)=else elif +preprocessor.end.$(file.patterns.cpp)=endif + [settings] # default extension used when saving files #extension=glsl
Modified: trunk/data/filetypes.vala =================================================================== --- trunk/data/filetypes.vala 2009-12-02 20:02:57 UTC (rev 4465) +++ trunk/data/filetypes.vala 2009-12-03 13:43:37 UTC (rev 4466) @@ -31,6 +31,13 @@ # these are some doxygen keywords (incomplete) docComment=attention author brief bug class code date def enum example exception file fn namespace note param remarks return see since struct throw todo typedef var version warning union
+[lexer_properties] +styling.within.preprocessor=1 +preprocessor.symbol.$(file.patterns.cpp)=# +preprocessor.start.$(file.patterns.cpp)=if +preprocessor.middle.$(file.patterns.cpp)=else elif +preprocessor.end.$(file.patterns.cpp)=endif + [settings] # default extension used when saving files #extension=vala
Modified: trunk/src/highlighting.c =================================================================== --- trunk/src/highlighting.c 2009-12-02 20:02:57 UTC (rev 4465) +++ trunk/src/highlighting.c 2009-12-03 13:43:37 UTC (rev 4466) @@ -891,9 +891,7 @@ }
-/* preprocess_ifdef: C#, Vala have a reduced preprocessor-like syntax without #ifdef */ -static void styleset_c_like(ScintillaObject *sci, gint ft_id, - gboolean preprocessor, gboolean preprocess_ifdef) +static void styleset_c_like(ScintillaObject *sci, gint ft_id) { gint styles[] = { SCE_C_DEFAULT, @@ -922,16 +920,6 @@ apply_filetype_properties(sci, SCLEX_CPP, ft_id);
apply_style_entries(sci, ft_id, styles, G_N_ELEMENTS(styles)); - if (preprocessor) - { - if (style_sets[ft_id].styling[20].foreground == 1) - sci_set_property(sci, "styling.within.preprocessor", "1"); - sci_set_property(sci, "preprocessor.symbol.$(file.patterns.cpp)", "#"); - sci_set_property(sci, "preprocessor.start.$(file.patterns.cpp)", - preprocess_ifdef ? "if ifdef ifndef" : "if"); - sci_set_property(sci, "preprocessor.middle.$(file.patterns.cpp)", "else elif"); - sci_set_property(sci, "preprocessor.end.$(file.patterns.cpp)", "endif"); - } }
@@ -949,9 +937,10 @@
static void styleset_c(ScintillaObject *sci, gint ft_id) { - styleset_c_like(sci, ft_id, TRUE, TRUE); + styleset_c_like(sci, ft_id);
sci_set_keywords(sci, 0, style_sets[ft_id].keywords[0]); + /* for SCI_SETKEYWORDS = 1, see below*/ sci_set_keywords(sci, 2, style_sets[ft_id].keywords[2]);
/* assign global types, merge them with user defined keywords and set them */ @@ -974,7 +963,7 @@
static void styleset_cpp(ScintillaObject *sci, gint ft_id) { - styleset_c_like(sci, ft_id, TRUE, TRUE); + styleset_c_like(sci, ft_id);
sci_set_keywords(sci, 0, style_sets[ft_id].keywords[0]); /* for SCI_SETKEYWORDS = 1, see below*/ @@ -1000,7 +989,7 @@
static void styleset_glsl(ScintillaObject *sci, gint ft_id) { - styleset_c_like(sci, ft_id, TRUE, TRUE); + styleset_c_like(sci, ft_id);
sci_set_keywords(sci, 0, style_sets[ft_id].keywords[0]); /* for SCI_SETKEYWORDS = 1, see below*/ @@ -1026,7 +1015,7 @@
static void styleset_cs(ScintillaObject *sci, gint ft_id) { - styleset_c_like(sci, ft_id, TRUE, FALSE); + styleset_c_like(sci, ft_id);
sci_set_keywords(sci, 0, style_sets[ft_id].keywords[0]); sci_set_keywords(sci, 2, style_sets[ft_id].keywords[2]); @@ -1050,7 +1039,7 @@
static void styleset_vala(ScintillaObject *sci, gint ft_id) { - styleset_c_like(sci, ft_id, TRUE, FALSE); + styleset_c_like(sci, ft_id);
sci_set_keywords(sci, 0, style_sets[ft_id].keywords[0]); sci_set_keywords(sci, 2, style_sets[ft_id].keywords[2]); @@ -1481,7 +1470,7 @@
static void styleset_java(ScintillaObject *sci, gint ft_id) { - styleset_c_like(sci, ft_id, FALSE, FALSE); + styleset_c_like(sci, ft_id);
sci_set_keywords(sci, 0, style_sets[ft_id].keywords[0]); sci_set_keywords(sci, 1, style_sets[ft_id].keywords[1]); @@ -2740,7 +2729,7 @@
static void styleset_ferite(ScintillaObject *sci, gint ft_id) { - styleset_c_like(sci, ft_id, FALSE, FALSE); + styleset_c_like(sci, ft_id);
sci_set_keywords(sci, 0, style_sets[ft_id].keywords[0]); sci_set_keywords(sci, 1, style_sets[ft_id].keywords[1]); @@ -2864,7 +2853,7 @@
static void styleset_js(ScintillaObject *sci, gint ft_id) { - styleset_c_like(sci, ft_id, FALSE, FALSE); + styleset_c_like(sci, ft_id);
sci_set_keywords(sci, 0, style_sets[ft_id].keywords[0]); } @@ -3024,7 +3013,7 @@
static void styleset_actionscript(ScintillaObject *sci, gint ft_id) { - styleset_c_like(sci, ft_id, FALSE, FALSE); + styleset_c_like(sci, ft_id);
sci_set_keywords(sci, 0, style_sets[ft_id].keywords[0]); sci_set_keywords(sci, 1, style_sets[ft_id].keywords[2]); @@ -3046,7 +3035,7 @@
static void styleset_haxe(ScintillaObject *sci, gint ft_id) { - styleset_c_like(sci, ft_id, FALSE, FALSE); + styleset_c_like(sci, ft_id);
sci_set_keywords(sci, 0, style_sets[ft_id].keywords[0]); sci_set_keywords(sci, 1, style_sets[ft_id].keywords[1]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.