diff --git a/doc/geany.html b/doc/geany.html
index 5f7f7a23..00c5aa07 100644
--- a/doc/geany.html
+++ b/doc/geany.html
@@ -2106,6 +2106,10 @@ If two identifiers are separated with the '=' character, the first
identifiers is replaced by the second identifiers for parsing purposes.
For even more detailed information please read the manual page of
Exuberant Ctags.
+Geany extends Ctags with a '*' character suffix - this means use
+prefix matching, e.g. G_GNUC_* will match G_GNUC_NULL_TERMINATED, etc.
+Note that prefix match items should be put after other items to ensure
+that items like G_GNUC_PRINTF+ get parsed correctly.
@@ -6772,7 +6776,7 @@ USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/doc/geany.txt b/doc/geany.txt
index 2c3a2fa0..cb0df729 100644
--- a/doc/geany.txt
+++ b/doc/geany.txt
@@ -1704,6 +1704,11 @@ manual page:
For even more detailed information please read the manual page of
Exuberant Ctags.
+Geany extends Ctags with a '*' character suffix - this means use
+prefix matching, e.g. G_GNUC_* will match G_GNUC_NULL_TERMINATED, etc.
+Note that prefix match items should be put after other items to ensure
+that items like G_GNUC_PRINTF+ get parsed correctly.
+
Preferences
-----------
diff --git a/tagmanager/options.c b/tagmanager/options.c
index 04b4cb06..4b4e97d9 100644
--- a/tagmanager/options.c
+++ b/tagmanager/options.c
@@ -175,11 +175,16 @@ extern boolean isIgnoreToken (const char *const name,
for (i = 0 ; i < len ; ++i)
{
vString *token = vStringNewInit (c_tags_ignore[i]);
+ const size_t tokenLen = vStringLength (token);
+ if (tokenLen >= 2 && vStringChar (token, tokenLen - 1) == '*' &&
+ strncmp (vStringValue (token), name, tokenLen - 1) == 0)
+ {
+ result = TRUE;
+ break;
+ }
if (strncmp (vStringValue (token), name, nameLen) == 0)
{
- const size_t tokenLen = vStringLength (token);
-
if (nameLen == tokenLen)
{
result = TRUE;