Mercurial > emacs
diff src/editfns.c @ 50430:4d74ea083bd2
(Fformat): Use a copy of FORMAT string so that we can
destructively change "%S" to "%s".
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Fri, 04 Apr 2003 10:47:15 +0000 |
| parents | 23a1cea22d13 |
| children | 0abd4951c0fb |
line wrap: on
line diff
--- a/src/editfns.c Thu Apr 03 23:15:47 2003 +0000 +++ b/src/editfns.c Fri Apr 04 10:47:15 2003 +0000 @@ -3240,6 +3240,8 @@ } CHECK_STRING (args[0]); + /* We may have to change "%S" to "%s". */ + args[0] = Fcopy_sequence (args[0]); /* If we start out planning a unibyte result, and later find it has to be multibyte, we jump back to retry. */ @@ -3326,6 +3328,11 @@ goto retry; } args[n] = tem; + /* If we restart the loop, we should not come here again + because args[n] is now a string and calling + Fprin1_to_string on it produces superflous double + quotes. So, change "%S" to "%s" now. */ + *format = 's'; goto string; } else if (SYMBOLP (args[n]))
