diff --git a/ChangeLog b/ChangeLog
index d41657eeaa2e58e2b46d1f72f35b85cc6a5ee045..875e3bab0c7895aa1ff0903c126b4b9d002a0702 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -53,7 +53,9 @@ CVS code -
 	  regex strings constantly,  and to actually compile them on an
 	  as-needed basis.  Also, make a color syntax specified on the
 	  command line override the syntax associated with the current
-	  file extension.  Changes to update_color(),
+	  file extension, and add a "default" syntax that takes no
+	  extensions for those files that don't match any other
+	  syntax's extensions.  Changes to update_color(),
 	  thanks_for_all_the_fish(), nregcomp(), parse_syntax(), and
 	  parse_colors(). (Brand Huntsman and DLR)
 	- Various other color fixes.  Handle unspecified foreground
@@ -285,6 +287,7 @@ CVS code -
 - doc/nanorc.sample:
 	- Add regexes for Bourne shell scripts. (Mike Frysinger, minor
 	  tweaks by DLR)
+	- Explain how the "default" syntax works. (DLR)
 - doc/man/fr/nano.1, doc/man/fr/nanorc.1:
 	- Updated translation by Jean-Philippe Gérard.
 - src/Makefile.am:
diff --git a/doc/nanorc.sample b/doc/nanorc.sample
index 7a0b5ad56380baed44d6d0b507a4eee3d0d8c54c..4226275bed1128c1094b6d5a01101b8e256e382f 100644
--- a/doc/nanorc.sample
+++ b/doc/nanorc.sample
@@ -147,12 +147,16 @@
 ##
 ## syntax "short description" ["filename regex" ...]
 ##
+## (The syntax "default" is reserved: it takes no filename regexes, and
+## applies to files that don't match any other syntax's filename
+## regexes.)
+##
 ## color foreground,background "regex" ["regex"...]
 ## or
 ## icolor foreground,background "regex" ["regex"...]
 ##
-## "color" will do case sensitive matches, while "icolor" will do case
-## insensitive matches.
+## ("color" will do case sensitive matches, while "icolor" will do case
+## insensitive matches.)
 ##
 ## Legal colors: white, black, red, blue, green, yellow, magenta, cyan.
 ## You may use the prefix "bright" to mean a stronger color highlight
diff --git a/src/color.c b/src/color.c
index c74ee905ad393106cf56088ca7dbff6bb4c1e185..658a81daa1da4170471fd109d00eca61d398df2a 100644
--- a/src/color.c
+++ b/src/color.c
@@ -108,7 +108,7 @@ void color_init(void)
 void color_update(void)
 {
     const syntaxtype *tmpsyntax;
-    colortype *tmpcolor;
+    colortype *tmpcolor, *defcolor = NULL;
 
     assert(openfile != NULL);
 
@@ -134,6 +134,15 @@ void color_update(void)
 		tmpsyntax = tmpsyntax->next) {
 	    exttype *e;
 
+	    /* If this is the default syntax, it has no associated
+	     * extensions.  (We've checked for this and for duplicate
+	     * syntax names elsewhere.)  Skip over it here, but keep
+	     * track of its color regexes. */
+	    if (mbstrcasecmp(tmpsyntax->desc, "default") == 0) {
+		defcolor = syntaxes->color;
+		continue;
+	    }
+
 	    for (e = tmpsyntax->extensions; e != NULL; e = e->next) {
 		bool not_compiled = (e->ext == NULL);
 
@@ -165,6 +174,11 @@ void color_update(void)
 	}
     }
 
+    /* If we didn't get a syntax based on the file extension, and we
+     * have a default syntax, use it. */
+    if (openfile->colorstrings == NULL && defcolor != NULL)
+	openfile->colorstrings = defcolor;
+
     for (tmpcolor = openfile->colorstrings; tmpcolor != NULL;
 	tmpcolor = tmpcolor->next) {
 	/* tmpcolor->start_regex and tmpcolor->end_regex have already
diff --git a/src/rcfile.c b/src/rcfile.c
index 14f7016276117e2becbf3b105bd3967d59be4969..2f0f980149934284545241b43ce641c1756caaa9 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -322,6 +322,12 @@ void parse_syntax(char *ptr)
     fprintf(stderr, "Starting a new syntax type: \"%s\"\n", nameptr);
 #endif
 
+    /* The default syntax should have no associated extensions. */
+    if (mbstrcasecmp(endsyntax->desc, "default") == 0 && *ptr != '\0') {
+	rcfile_error(N_("The default syntax must take no extensions"));
+	return;
+    }
+
     /* Now load the extensions into their part of the struct. */
     while (*ptr != '\0') {
 	exttype *newext;