diff --git a/ChangeLog b/ChangeLog index afcbda54..9e723ee4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ * geany.glade, src/callbacks.c, src/callbacks.h, src/geany.h, src/interface.c, src/main.c, src/ui_utils.c: Improve sensitivity of recent files sub menus. + * src/filetypes.c: Add shebank-like detection for XML files. 2007-05-25 Nick Treleaven diff --git a/src/filetypes.c b/src/filetypes.c index dcb992f2..7fad28b4 100644 --- a/src/filetypes.c +++ b/src/filetypes.c @@ -574,7 +574,7 @@ static filetype *find_shebang(gint idx) gchar *line = sci_get_line(doc_list[idx].sci, 0); filetype *ft = NULL; - if (strlen(line) > 2 && line[0] == '#' && line[1]=='!') + if (strlen(line) > 2 && line[0] == '#' && line[1] == '!') { /// TODO does g_path_get_basename() also work under Win32 for Unix filenames? gchar *basename_interpreter = g_path_get_basename(line + 2); @@ -609,6 +609,20 @@ static filetype *find_shebang(gint idx) g_free(basename_interpreter); } + // detect XML files + if (strncmp(line, "