SF.net SVN: geany:[4464] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Wed Dec 2 16:38:28 UTC 2009


Revision: 4464
          http://geany.svn.sourceforge.net/geany/?rev=4464&view=rev
Author:   ntrel
Date:     2009-12-02 16:38:20 +0000 (Wed, 02 Dec 2009)

Log Message:
-----------
Add/improve debug messages for custom filetypes.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/filetypes.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-12-02 16:34:25 UTC (rev 4463)
+++ trunk/ChangeLog	2009-12-02 16:38:20 UTC (rev 4464)
@@ -3,6 +3,8 @@
  * doc/geany.txt, doc/geany.html:
    Warn about not using BOM for configuration files (confuses GKeyFile
    parser, at least on my system).
+ * src/filetypes.c:
+   Add/improve debug messages for custom filetypes.
 
 
 2009-11-30  Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>

Modified: trunk/src/filetypes.c
===================================================================
--- trunk/src/filetypes.c	2009-12-02 16:34:25 UTC (rev 4463)
+++ trunk/src/filetypes.c	2009-12-02 16:38:20 UTC (rev 4464)
@@ -695,13 +695,13 @@
 	if (g_hash_table_lookup(filetypes_hash, fn))
 		return;
 
-	geany_debug("Adding filetype %s.", fn);
 	ft = filetype_new();
 	ft->name = g_strdup(fn);
 	filetype_make_title(ft, TITLE_FILE);
 	ft->pattern = g_new0(gchar*, 1);
 	ft->priv->custom = TRUE;
 	filetype_add(ft);
+	geany_debug("Added filetype %s (%d).", ft->name, ft->id);
 }
 
 
@@ -1241,6 +1241,8 @@
 	if (result)
 	{
 		ft->lang = tm_source_file_get_named_lang(result);
+		if (ft->lang < 0)
+			geany_debug("Cannot find tag parser '%s' for custom filetype '%s'.", result, ft->name);
 		g_free(result);
 	}
 
@@ -1250,6 +1252,8 @@
 	if (result)
 	{
 		ft->lexer_filetype = filetypes_lookup_by_name(result);
+		if (!ft->lexer_filetype)
+			geany_debug("Cannot find lexer filetype '%s' for custom filetype '%s'.", result, ft->name);
 		g_free(result);
 	}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list