diff --git a/ChangeLog b/ChangeLog
index 20b450e744ec893fd696e64453291cc9f2524ff1..749ae3dff5779026d5c72cab08f908ab3dd8c65a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@
 	one with single quotes work again, and add some comments.
 	* doc/syntax/{man,python,fortran}.nanorc: Add regexes for comments,
 	trailing whitespace and reminders, and trim some trailing spaces.
+	* src/rcfile.c: Move parse_magic_exp() next to its sister.
 
 2014-05-10 Chris Allegretta <chrisa@asty.org>
 	* src/rcfile.c (parse_color_names): Redefine false and true to
diff --git a/src/rcfile.c b/src/rcfile.c
index 28004913d5a0622ee215c9bc440248fb2e4d1d24..36499cfe220be260d90588cc4012495dcf5a6855 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -378,75 +378,8 @@ void parse_syntax(char *ptr)
 	    free(newext);
     }
 }
-
-/* Parse the magic regexes that may influence the choice of syntax. */
-void parse_magic_exp(char *ptr)
-{
-#ifdef HAVE_LIBMAGIC
-    regexlisttype *endmagic = NULL;
-
-    assert(ptr != NULL);
-
-    if (syntaxes == NULL) {
-	rcfile_error(
-		N_("Cannot add a magic string regex without a syntax command"));
-	return;
-    }
-
-    if (*ptr == '\0') {
-	rcfile_error(N_("Missing magic string name"));
-	return;
-    }
-
-    if (*ptr != '"') {
-	rcfile_error(
-		N_("Regex strings must begin and end with a \" character"));
-	return;
-    }
-
-#ifdef DEBUG
-    fprintf(stderr, "Starting a magic type: \"%s\"\n", ptr);
-#endif
-
-    /* Now load the magic regexes into their part of the struct. */
-    while (*ptr != '\0') {
-	const char *regexstring;
-	regexlisttype *newmagic;
-
-	while (*ptr != '"' && *ptr != '\0')
-	    ptr++;
-
-	if (*ptr == '\0')
-	    return;
-
-	ptr++;
-
-	regexstring = ptr;
-	ptr = parse_next_regex(ptr);
-	if (ptr == NULL)
-	    break;
-
-	newmagic = (regexlisttype *)nmalloc(sizeof(regexlisttype));
-
-	/* Save the regex string if it's valid. */
-	if (nregcomp(regexstring, REG_NOSUB)) {
-	    newmagic->ext_regex = mallocstrcpy(NULL, regexstring);
-	    newmagic->ext = NULL;
-
-	    if (endmagic == NULL)
-		endsyntax->magics = newmagic;
-	    else
-		endmagic->next = newmagic;
-	    endmagic = newmagic;
-	    endmagic->next = NULL;
-	} else
-	    free(newmagic);
-    }
-#endif /* HAVE_LIBMAGIC */
-}
 #endif /* !DISABLE_COLOR */
 
-
 int check_bad_binding(sc *s)
 {
 #define BADLISTLEN 1
@@ -927,6 +860,74 @@ void parse_header_exp(char *ptr)
     }
 }
 
+#ifndef DISABLE_COLOR
+/* Parse the magic regexes that may influence the choice of syntax. */
+void parse_magic_exp(char *ptr)
+{
+#ifdef HAVE_LIBMAGIC
+    regexlisttype *endmagic = NULL;
+
+    assert(ptr != NULL);
+
+    if (syntaxes == NULL) {
+	rcfile_error(
+		N_("Cannot add a magic string regex without a syntax command"));
+	return;
+    }
+
+    if (*ptr == '\0') {
+	rcfile_error(N_("Missing magic string name"));
+	return;
+    }
+
+    if (*ptr != '"') {
+	rcfile_error(
+		N_("Regex strings must begin and end with a \" character"));
+	return;
+    }
+
+#ifdef DEBUG
+    fprintf(stderr, "Starting a magic type: \"%s\"\n", ptr);
+#endif
+
+    /* Now load the magic regexes into their part of the struct. */
+    while (*ptr != '\0') {
+	const char *regexstring;
+	regexlisttype *newmagic;
+
+	while (*ptr != '"' && *ptr != '\0')
+	    ptr++;
+
+	if (*ptr == '\0')
+	    return;
+
+	ptr++;
+
+	regexstring = ptr;
+	ptr = parse_next_regex(ptr);
+	if (ptr == NULL)
+	    break;
+
+	newmagic = (regexlisttype *)nmalloc(sizeof(regexlisttype));
+
+	/* Save the regex string if it's valid. */
+	if (nregcomp(regexstring, REG_NOSUB)) {
+	    newmagic->ext_regex = mallocstrcpy(NULL, regexstring);
+	    newmagic->ext = NULL;
+
+	    if (endmagic == NULL)
+		endsyntax->magics = newmagic;
+	    else
+		endmagic->next = newmagic;
+	    endmagic = newmagic;
+	    endmagic->next = NULL;
+	} else
+	    free(newmagic);
+    }
+#endif /* HAVE_LIBMAGIC */
+}
+#endif /* !DISABLE_COLOR */
+
 /* Parse the linter requested for this syntax.  Simple? */
 void parse_linter(char *ptr)
 {