diff --git a/ChangeLog b/ChangeLog
index a913c0befb53001f74f844eb1bfcf889aa0d7939..aa916a90474dac0aaa468ab130ebf11a79f1c757 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,9 @@
-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/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/rcfile.c (parse_rcfile): Close an extended syntax again.
 
 2016-02-28  Benno Schulenberg  <bensberg@justemail.net>
 	* src/rcfile.c (parse_header_exp): Don't continue when something is
diff --git a/src/rcfile.c b/src/rcfile.c
index b1928264f84c18db4b89165525da2ceaa2d47d93..1b7fe7e06eac1322bf55f890cf764a39fd02e8d0 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -1063,6 +1063,7 @@ void parse_rcfile(FILE *rcstream
 
 	    if (ts == NULL) {
 		rcfile_error(N_("Could not find syntax \"%s\" to extend"), syntaxname);
+		opensyntax = FALSE;
 		continue;
 	    } else {
 		opensyntax = TRUE;
@@ -1142,6 +1143,7 @@ void parse_rcfile(FILE *rcstream
 	if (end_syn_save != NULL) {
 	    endsyntax = end_syn_save;
 	    end_syn_save = NULL;
+	    opensyntax = FALSE;
 	}
 #endif