Revision: 968 http://svn.sourceforge.net/geany/?rev=968&view=rev Author: eht16 Date: 2006-11-04 14:38:11 -0800 (Sat, 04 Nov 2006)
Log Message: ----------- Applied patch from Bob Doan to do not set keywords for XML documents(thanks). Made styleset_markup() static.
Modified Paths: -------------- trunk/ChangeLog trunk/THANKS trunk/src/highlighting.c trunk/src/highlighting.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-11-04 12:49:55 UTC (rev 967) +++ trunk/ChangeLog 2006-11-04 22:38:11 UTC (rev 968) @@ -1,3 +1,11 @@ +2006-11-04 Enrico Tröger enrico.troeger@uvena.de + + * src/highlighting.c, src/highlighting.h: + Applied patch from Bob Doan to do not set keywords for XML + documents(thanks). + Made styleset_markup() static. + + 2006-11-04 Nick Treleaven nick.treleaven@btinternet.com
* src/search.c: Fix pressing enter to search from the Find dialog.
Modified: trunk/THANKS =================================================================== --- trunk/THANKS 2006-11-04 12:49:55 UTC (rev 967) +++ trunk/THANKS 2006-11-04 22:38:11 UTC (rev 968) @@ -18,6 +18,7 @@ Tamim <amitamim(at)gmail(dot)com> Kevin Ellwood <kellwood(at)ameritech(dot)net> Stefan Oltmanns <stefan(dot)oltmanns(at)abi2006(dot)gymnasium-achim(dot)de> - escape sequences patch +Bob Doan <bdoan(at)sicom(dot)com> - some patches
Translators: ----------------------------------
Modified: trunk/src/highlighting.c =================================================================== --- trunk/src/highlighting.c 2006-11-04 12:49:55 UTC (rev 967) +++ trunk/src/highlighting.c 2006-11-04 22:38:11 UTC (rev 968) @@ -31,6 +31,8 @@ #include "symbols.h"
+static void styleset_markup(ScintillaObject *sci, gboolean set_keywords); + typedef struct { gint foreground; @@ -995,7 +997,7 @@ SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
// use the same colouring as for XML - styleset_markup(sci); + styleset_markup(sci, TRUE);
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) style_sets[GEANY_FILETYPES_PHP].wordchars); } @@ -1034,7 +1036,7 @@ SSM(sci, SCI_AUTOCSETMAXHEIGHT, app->autocompletion_max_height, 0);
// use the same colouring for HTML; XML and so on - styleset_markup(sci); + styleset_markup(sci, TRUE);
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) style_sets[GEANY_FILETYPES_HTML].wordchars); } @@ -1125,16 +1127,19 @@ }
-void styleset_markup(ScintillaObject *sci) +static void styleset_markup(ScintillaObject *sci, gboolean set_keywords) { if (style_sets[GEANY_FILETYPES_XML].styling == NULL) styleset_markup_init();
- - SSM(sci, SCI_SETKEYWORDS, 0, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[0]); - SSM(sci, SCI_SETKEYWORDS, 1, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[1]); - SSM(sci, SCI_SETKEYWORDS, 2, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[2]); - SSM(sci, SCI_SETKEYWORDS, 3, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[3]); - SSM(sci, SCI_SETKEYWORDS, 4, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[4]); + // don't set keywords for plain XML + if(set_keywords) + { + SSM(sci, SCI_SETKEYWORDS, 0, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[0]); + SSM(sci, SCI_SETKEYWORDS, 1, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[1]); + SSM(sci, SCI_SETKEYWORDS, 2, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[2]); + SSM(sci, SCI_SETKEYWORDS, 3, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[3]); + SSM(sci, SCI_SETKEYWORDS, 4, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[4]); + } SSM(sci, SCI_SETKEYWORDS, 5, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[5]);
// hotspotting, nice thing @@ -1732,7 +1737,7 @@ SSM (sci, SCI_SETLEXER, SCLEX_XML, 0);
// use the same colouring for HTML; XML and so on - styleset_markup(sci); + styleset_markup(sci, FALSE);
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) style_sets[GEANY_FILETYPES_XML].wordchars); }
Modified: trunk/src/highlighting.h =================================================================== --- trunk/src/highlighting.h 2006-11-04 12:49:55 UTC (rev 967) +++ trunk/src/highlighting.h 2006-11-04 22:38:11 UTC (rev 968) @@ -62,8 +62,6 @@
void styleset_xml(ScintillaObject *sci);
-void styleset_markup(ScintillaObject *sci); - void styleset_docbook(ScintillaObject *sci);
void styleset_none(ScintillaObject *sci);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.