+extern "C" {
+static void wxGtkOnRemoveTag(GtkTextBuffer *buffer,
+ GtkTextTag *tag,
+ GtkTextIter *start,
+ GtkTextIter *end,
+ gpointer user_data)
+{
+ gchar *name;
+ g_object_get (tag, "name", &name, NULL);
+
+ if (!name || strncmp(name, "WX", 2)) // anonymous tag or not starting with "WX"
+ g_signal_stop_emission_by_name(buffer, "remove_tag");
+
+ g_free(name);
+}
+}
+
+extern "C" {