aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2004-09-12 21:35:14 +0000
committerKim F. Storm2004-09-12 21:35:14 +0000
commit15fad0379b062240bfaf95cbb6a612efd5d84225 (patch)
treea33284774db50da586a8899b9cb7ea8e314e79d5 /src
parent4e687447ad2db8b2bb588ae0a28df50567e42f84 (diff)
downloademacs-15fad0379b062240bfaf95cbb6a612efd5d84225.tar.gz
emacs-15fad0379b062240bfaf95cbb6a612efd5d84225.zip
(Fformat): Handle format strings with multiple text
properties. Reverse text property list from the format string, so the positions are in increasing order.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 88a0e63118f..51f8a71d531 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3668,11 +3668,13 @@ usage: (format STRING &rest OBJECTS) */)
3668 3668
3669 /* Adjust the bounds of each text property 3669 /* Adjust the bounds of each text property
3670 to the proper start and end in the output string. */ 3670 to the proper start and end in the output string. */
3671 /* We take advantage of the fact that the positions in PROPS
3672 are in increasing order, so that we can do (effectively)
3673 one scan through the position space of the format string.
3674 3671
3675 BYTEPOS is the byte position in the format string, 3672 /* Put the positions in PROPS in increasing order, so that
3673 we can do (effectively) one scan through the position
3674 space of the format string. */
3675 props = Fnreverse (props);
3676
3677 /* BYTEPOS is the byte position in the format string,
3676 POSITION is the untranslated char position in it, 3678 POSITION is the untranslated char position in it,
3677 TRANSLATED is the translated char position in BUF, 3679 TRANSLATED is the translated char position in BUF,
3678 and ARGN is the number of the next arg we will come to. */ 3680 and ARGN is the number of the next arg we will come to. */