Commit 85e166b0 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

"Closing" an extended syntax again, to prevent sneakily extending

the last-defined syntax.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5700 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 773fc447
Showing with 6 additions and 2 deletions
+6 -2
2016-02-28 Benno Schulenberg <bensberg@justemail.net> 2016-02-29 Benno Schulenberg <bensberg@justemail.net>
* src/nano.h, src/rcfile.c, src/color.c: Rename a struct member. * src/nano.h, src/rcfile.c, src/color.c: Rename a struct member.
* src/rcfile.c (parse_rcfile): Don't allocate struct for none syntax. * src/rcfile.c (parse_rcfile): Don't allocate a struct for the "none"
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.
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
......
...@@ -1063,6 +1063,7 @@ void parse_rcfile(FILE *rcstream ...@@ -1063,6 +1063,7 @@ void parse_rcfile(FILE *rcstream
if (ts == NULL) { if (ts == 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;
continue; continue;
} else { } else {
opensyntax = TRUE; opensyntax = TRUE;
...@@ -1142,6 +1143,7 @@ void parse_rcfile(FILE *rcstream ...@@ -1142,6 +1143,7 @@ void parse_rcfile(FILE *rcstream
if (end_syn_save != NULL) { if (end_syn_save != NULL) {
endsyntax = end_syn_save; endsyntax = end_syn_save;
end_syn_save = NULL; end_syn_save = NULL;
opensyntax = FALSE;
} }
#endif #endif
......
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