diff --git a/ChangeLog b/ChangeLog
index 07c0efcfaaf354d34ec3542918a460ad512495e7..1d8b3ef7af77405572311ed8e96f915e11fd03b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -259,6 +259,9 @@ CVS code -
   parse_colors()
 	- Check for a color command's not following a syntax line before
 	  anything else. (DLR)
+  parse_rcfile()
+	- Properly generate an error if we've read in a syntax without
+	  any associated color commands. (DLR)
   do_rcfile()
 	- Check for the rcfile's being a directory or device file and
 	  reject it if it is, for consistency with file handling
diff --git a/src/rcfile.c b/src/rcfile.c
index 157cacd19f65e9a286f1bf029107fdbdd9a8ddc3..508fa4802d7ebf36571547bfde8e968be688ec32 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -835,6 +835,9 @@ void parse_rcfile(FILE *rcstream
 	    rcfile_error(N_("Unknown flag %s"), option);
     }
 
+    if (endsyntax != NULL && endcolor == NULL)
+	rcfile_error(N_("Syntax has no color commands"));
+
     free(buf);
     fclose(rcstream);
     lineno = 0;