changeset 57076:d2baef38bbd7

(Fformat): Handle format strings with multiple text properties. Reverse text property list from the format string, so the positions are in increasing order.
author Kim F. Storm <storm@cua.dk>
date Sun, 12 Sep 2004 21:35:14 +0000
parents 57f225a13a09
children 35b4fdda578a
files src/editfns.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Sun Sep 12 20:26:39 2004 +0000
+++ b/src/editfns.c	Sun Sep 12 21:35:14 2004 +0000
@@ -3668,11 +3668,13 @@
 
 	  /* Adjust the bounds of each text property
 	     to the proper start and end in the output string.  */
-	  /* We take advantage of the fact that the positions in PROPS
-	     are in increasing order, so that we can do (effectively)
-	     one scan through the position space of the format string.
-
-	     BYTEPOS is the byte position in the format string,
+
+	  /* Put the positions in PROPS in increasing order, so that
+	     we can do (effectively) one scan through the position
+	     space of the format string.  */
+	  props = Fnreverse (props);
+
+	  /* BYTEPOS is the byte position in the format string,
 	     POSITION is the untranslated char position in it,
 	     TRANSLATED is the translated char position in BUF,
 	     and ARGN is the number of the next arg we will come to.  */