Browse Source

* syntax.c (edit_read_syntax_file): Use system wide Syntax
Highlighting definitions' file if there is no users one.

Andrew V. Samoilov 23 years ago
parent
commit
47f1ce66af
2 changed files with 12 additions and 6 deletions
  1. 5 0
      edit/ChangeLog
  2. 7 6
      edit/syntax.c

+ 5 - 0
edit/ChangeLog

@@ -1,3 +1,8 @@
+2002-03-25  Andrew V. Samoilov  <kai@cmail.ru>
+
+	* syntax.c (edit_read_syntax_file): Use system wide Syntax
+	Highlighting definitions' file if there is no users one.
+
 2002-03-18  Pavel Roskin  <proski@gnu.org>
 
 	* edit.h: Use eregex.h, not regex.h.

+ 7 - 6
edit/syntax.c

@@ -866,13 +866,14 @@ static int edit_read_syntax_file (WEdit * edit, char **names, char *syntax_file,
     int count = 0;
     char *lib_file;
 
-    lib_file = concat_dir_and_file (mc_home, "syntax" PATH_SEP_STR "Syntax");
-    check_for_default (lib_file, syntax_file);
-    g_free (lib_file);
-
     f = fopen (syntax_file, "r");
-    if (!f)
-	return -1;
+    if (!f){
+	lib_file = concat_dir_and_file (mc_home, "syntax" PATH_SEP_STR "Syntax");
+	f = fopen (lib_file, "r");
+	g_free (lib_file);
+	if (!f)
+	    return -1;
+    }
     args[0] = 0;
     for (;;) {
 	line++;