Commit 04669b56 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Renaming a variable and reshuffling a few lines.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5701 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Showing with 10 additions and 7 deletions
+10 -7
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
syntax, and thus prevent it from being extended. syntax, and thus prevent it from being extended.
* src/nano.h, src/rcfile.c: Arrange some things more orderly. * src/nano.h, src/rcfile.c: Arrange some things more orderly.
* src/rcfile.c (parse_rcfile): Close an extended syntax again. * src/rcfile.c (parse_rcfile): Close an extended syntax again.
* src/rcfile.c (parse_rcfile): Rename a variable.
2016-02-28 Benno Schulenberg <bensberg@justemail.net> 2016-02-28 Benno Schulenberg <bensberg@justemail.net>
* src/rcfile.c (parse_header_exp): Don't continue when something is * src/rcfile.c (parse_header_exp): Don't continue when something is
......
...@@ -1053,22 +1053,24 @@ void parse_rcfile(FILE *rcstream ...@@ -1053,22 +1053,24 @@ void parse_rcfile(FILE *rcstream
#ifndef DISABLE_COLOR #ifndef DISABLE_COLOR
/* Handle extending first... */ /* Handle extending first... */
if (strcasecmp(keyword, "extendsyntax") == 0) { if (strcasecmp(keyword, "extendsyntax") == 0) {
syntaxtype *sint;
char *syntaxname = ptr; char *syntaxname = ptr;
syntaxtype *ts = NULL;
ptr = parse_next_word(ptr); ptr = parse_next_word(ptr);
for (ts = syntaxes; ts != NULL; ts = ts->next)
if (!strcmp(ts->name, syntaxname)) for (sint = syntaxes; sint != NULL; sint = sint->next)
if (!strcmp(sint->name, syntaxname))
break; break;
if (ts == NULL) { if (sint == NULL) {
rcfile_error(N_("Could not find syntax \"%s\" to extend"), syntaxname); rcfile_error(N_("Could not find syntax \"%s\" to extend"),
syntaxname);
opensyntax = FALSE; opensyntax = FALSE;
continue; continue;
} else { } else {
opensyntax = TRUE;
end_syn_save = endsyntax; end_syn_save = endsyntax;
endsyntax = ts; endsyntax = sint;
opensyntax = TRUE;
keyword = ptr; keyword = ptr;
ptr = parse_next_word(ptr); ptr = parse_next_word(ptr);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment