diff --git a/ChangeLog b/ChangeLog
index 67fc84ba6787800fa3e6d3d73c4531f324693b87..4a581eae3f14536100026ac33fadbd24941b7650 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
 	these functions, to be more distinguishable.
 	* src/rcfile.c (parse_colors): Reduce the indentation.
 	* src/rcfile.c (parse_colors): Rename a variable.
+	* src/rcfile.c (parse_colors, parse_rcfile): Refind the tail of
+	the colors list only when extending, not for every added color.
 
 2016-03-11  Benno Schulenberg  <bensberg@justemail.net>
 	* src/browser.c (do_browser): Fix compilation when configured with
diff --git a/src/rcfile.c b/src/rcfile.c
index e1f1a27e74c64590604faac675784cfb58ba7c5b..26bd0fea36a9a1a42e15e925c080613999316014 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -705,13 +705,8 @@ void parse_colors(char *ptr, bool icase)
 #endif
 	    if (endcolor == NULL)
 		live_syntax->color = newcolor;
-	    else {
-		/* Need to recompute endcolor now so we can extend
-		 * colors to syntaxes. */
-		for (endcolor = live_syntax->color; endcolor->next != NULL;)
-		    endcolor = endcolor->next;
+	    else
 		endcolor->next = newcolor;
-	    }
 
 	    endcolor = newcolor;
 	}
@@ -963,6 +958,12 @@ void parse_rcfile(FILE *rcstream
 	    live_syntax = sint;
 	    opensyntax = TRUE;
 
+	    /* Refind the tail of the color list for this syntax. */
+	    endcolor = sint->color;
+	    if (endcolor != NULL)
+		while (endcolor->next != NULL)
+		    endcolor = endcolor->next;
+
 	    keyword = ptr;
 	    ptr = parse_next_word(ptr);
 	}