Add some rc file name debugging
Add debian nanorc example Fix that previous entries as well as new one need Makefile.am entries git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4245 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
2ea0b8fa03
commit
cc60c3a767
|
@ -1,6 +1,9 @@
|
||||||
2008-03-19 Chris Allegretta <chrisa@asty.org>
|
2008-03-19 Chris Allegretta <chrisa@asty.org>
|
||||||
* gloabl.c: Fix bracket matching sequence to be M-] not M-[, as reported
|
* gloabl.c: Fix bracket matching sequence to be M-] not M-[, as reported
|
||||||
Nick Warne <nick@ukfsn.org>.
|
Nick Warne <nick@ukfsn.org>.
|
||||||
|
* doc/syntax/Makefile.am - Actually include new syntaxes from Mike, etc
|
||||||
|
* debian.nanorc - New debian sources.list config since we're including
|
||||||
|
gentoo, adapted from Milian Wolff <mail@milianw.de>
|
||||||
|
|
||||||
2008-03-18 Mike Frysinger <vapier@gentoo.org>
|
2008-03-18 Mike Frysinger <vapier@gentoo.org>
|
||||||
* winio.c: Remove unneeded variable in parse_kbinput()
|
* winio.c: Remove unneeded variable in parse_kbinput()
|
||||||
|
|
|
@ -12,6 +12,10 @@ pkgdata_DATA = asm.nanorc \
|
||||||
python.nanorc \
|
python.nanorc \
|
||||||
ruby.nanorc \
|
ruby.nanorc \
|
||||||
sh.nanorc \
|
sh.nanorc \
|
||||||
tex.nanorc
|
tex.nanorc \
|
||||||
|
tcl.nanorc \
|
||||||
|
php.nanorc \
|
||||||
|
gentoo.nanorc \
|
||||||
|
debian.nanorc
|
||||||
|
|
||||||
EXTRA_DIST = $(pkgdata_DATA)
|
EXTRA_DIST = $(pkgdata_DATA)
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
## Here is an exmaple for apt's sources.list
|
||||||
|
## Adapted from http://milianw.de/blog/Syntax-Highlighting-in-Nano
|
||||||
|
## (mail@milianw.de).
|
||||||
|
##
|
||||||
|
syntax "apt/sources.list" "sources\.list(\.old|~)?$"
|
||||||
|
# component
|
||||||
|
color brightmagenta "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/) [^ ]+ .+$"
|
||||||
|
# distribution
|
||||||
|
color brightred "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/) [^ ]+"
|
||||||
|
# URI
|
||||||
|
color brightgreen "(http|file|ftp):/[^ ]+"
|
||||||
|
# cdroms
|
||||||
|
# [^\]] does not work...
|
||||||
|
color brightgreen "cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/"
|
||||||
|
# deb / deb-src
|
||||||
|
color yellow "^deb"
|
||||||
|
color yellow "^deb-src"
|
||||||
|
# comments
|
||||||
|
color brightblue "#.*"
|
||||||
|
|
|
@ -478,6 +478,10 @@ void parse_include(char *ptr)
|
||||||
nanorc = full_option;
|
nanorc = full_option;
|
||||||
lineno = 0;
|
lineno = 0;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, "Parsing file \"%s\"\n", full_option);
|
||||||
|
#endif
|
||||||
|
|
||||||
parse_rcfile(rcstream
|
parse_rcfile(rcstream
|
||||||
#ifdef ENABLE_COLOR
|
#ifdef ENABLE_COLOR
|
||||||
, TRUE
|
, TRUE
|
||||||
|
@ -991,6 +995,10 @@ void do_rcfile(void)
|
||||||
_("\"%s\" is a device file"), nanorc);
|
_("\"%s\" is a device file"), nanorc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, "Parsing file \"%s\"\n", nanorc);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Try to open the system-wide nanorc. */
|
/* Try to open the system-wide nanorc. */
|
||||||
rcstream = fopen(nanorc, "rb");
|
rcstream = fopen(nanorc, "rb");
|
||||||
if (rcstream != NULL)
|
if (rcstream != NULL)
|
||||||
|
|
Loading…
Reference in New Issue