diff options
author | Kenichi Handa <[email protected]> | 2003-04-04 10:47:26 +0000 |
---|---|---|
committer | Kenichi Handa <[email protected]> | 2003-04-04 10:47:26 +0000 |
commit | aa8b70aef52ebe70bf1599b358cfa8a86be6f1bb (patch) | |
tree | 715626e1a305aad973f945ebe0ec45e352167122 /src/editfns.c | |
parent | efc13f4638e8f5eff09da00c3e8a58d7a5542c98 (diff) |
(Fformat): Use a copy of FORMAT string so that we can
destructively change "%S" to "%s".
Diffstat (limited to 'src/editfns.c')
-rw-r--r-- | src/editfns.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/editfns.c b/src/editfns.c index 0c012514f9..360e067a29 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3240,6 +3240,8 @@ usage: (format STRING &rest OBJECTS) */) } 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 @@ usage: (format STRING &rest OBJECTS) */) 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])) |