diff options
author | Kim F. Storm <storm@cua.dk> | 2004-09-12 21:35:14 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2004-09-12 21:35:14 +0000 |
commit | 15fad0379b062240bfaf95cbb6a612efd5d84225 (patch) | |
tree | a33284774db50da586a8899b9cb7ea8e314e79d5 /src/editfns.c | |
parent | 4e687447ad2db8b2bb588ae0a28df50567e42f84 (diff) | |
download | emacs-15fad0379b062240bfaf95cbb6a612efd5d84225.tar.gz |
(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/editfns.c')
-rw-r--r-- | src/editfns.c | 10 |
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) */) /* 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. */ |