mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-18 17:29:28 +03:00
* syntax.c (open_include_file) [MIDNIGHT]: Don't hardcode location
of syntax file(s) with LIBDIR, use mc_home instead. From Ludovic Drolez <ludovic.drolez@freealter.com>. (syntax_text): Use perl.syntax to highlight perl modules (.pm).
This commit is contained in:
parent
f52cfa5607
commit
733c2dd05e
@ -1,3 +1,11 @@
|
||||
2001-05-30 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* syntax.c (open_include_file) [MIDNIGHT]: Don't hardcode location
|
||||
of syntax file(s) with LIBDIR, use mc_home instead.
|
||||
From Ludovic Drolez <ludovic.drolez@freealter.com>.
|
||||
|
||||
(syntax_text): Use perl.syntax to highlight perl modules (.pm).
|
||||
|
||||
2001-05-18 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* editcmd.c (edit_replace_prompt): Warning fix.
|
||||
|
@ -592,8 +592,8 @@ int this_allocate_color (WEdit *edit, char *fg)
|
||||
return allocate_color (fg);
|
||||
return allocate_color (p + 1);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif /* GTK */
|
||||
#endif /* MIDNIGHT */
|
||||
|
||||
static char *error_file_name = 0;
|
||||
|
||||
@ -613,7 +613,12 @@ static FILE *open_include_file (char *filename)
|
||||
f = fopen (p, "r");
|
||||
if (f)
|
||||
return f;
|
||||
#ifndef MIDNIGHT
|
||||
strcpy (p, LIBDIR "/syntax/");
|
||||
#else
|
||||
strcpy (p, mc_home);
|
||||
strcat (p, "/syntax/");
|
||||
#endif
|
||||
strcat (p, filename);
|
||||
syntax_free (error_file_name);
|
||||
error_file_name = (char *) strdup (p);
|
||||
@ -1207,7 +1212,7 @@ static const char * const syntax_text[] = {
|
||||
"file ..\\*\\\\.sh$ Shell\\sScript ^#!\\s\\*/.\\*/(ksh|bash|sh|pdkzsh)",
|
||||
"include sh.syntax",
|
||||
"",
|
||||
"file ..\\*\\\\.(pl|PL])$ Perl\\sProgram ^#!\\s\\*/.\\*/perl",
|
||||
"file ..\\*\\\\.(pl|PL|pm|PM])$ Perl\\sProgram ^#!\\s\\*/.\\*/perl",
|
||||
"include perl.syntax",
|
||||
"",
|
||||
"file ..\\*\\\\.(py|PY])$ Python\\sProgram ^#!\\s\\*/.\\*/python",
|
||||
@ -1557,5 +1562,3 @@ int edit_check_spelling (WEdit * edit)
|
||||
|
||||
#endif /* !defined(MIDNIGHT) || defined(HAVE_SYNTAXH) */
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user