Le 23/10/2020 à 14:51, Claude Paroz a écrit :
> […]
> I also see now anonymous functions used with addEventListener('click',
> function () {...}); as
> 
> AnonymousFunction1
> AnonymousFunction2
> ...
> which is not really useful. I guess it's not possible to turn that off?

Not currently without hacking the code a bit.  Something like the
attached patch should do, but I don't guarantee it doesn't have some
corner case side effects on other tags.

Regards,
Colomban
diff --git a/ctags/main/entry.c b/ctags/main/entry.c
index b2ea525ec..8c4adf96c 100644
--- a/ctags/main/entry.c
+++ b/ctags/main/entry.c
@@ -1126,6 +1126,10 @@ static void writeTagEntry (const tagEntryInfo *const tag)
 	DebugStatement ( debugEntry (tag); )
 	Assert (writer);
 
+	if (isTagExtraBitMarked (tag, XTAG_ANONYMOUS) &&
+	    ! isXtagEnabled (XTAG_ANONYMOUS))
+		return;
+
 	if (includeExtensionFlags ()
 	    && isXtagEnabled (XTAG_QUALIFIED_TAGS)
 	    && doesInputLanguageRequestAutomaticFQTag ())
diff --git a/ctags/main/xtag.c b/ctags/main/xtag.c
index f6d5a4602..4040a01db 100644
--- a/ctags/main/xtag.c
+++ b/ctags/main/xtag.c
@@ -39,7 +39,7 @@ static xtagDesc xtagDescs [] = {
 	  "Include reference tags", NULL},
 	{ false, 's', "subparser",
 	  "Include tags generated by sub parsers", NULL},
-	{ true, '\0', "anonymous",
+	{ false, '\0', "anonymous",
 	  "Include tags for non-named objects like lambda"},
 };
 
_______________________________________________
Users mailing list
[email protected]
https://lists.geany.org/cgi-bin/mailman/listinfo/users

Reply via email to