summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index eef6ba44..f63e01a1 100644
--- a/eval.c
+++ b/eval.c
@@ -2979,14 +2979,18 @@ static val fmt_tostring(val obj)
static val fmt_cat(val obj, val sep)
{
+ val self = lit("quasistring formatting");
+
switch (type(obj)) {
case LIT:
case STR:
case LSTR:
- return obj;
+ return if3(null_or_missing_p(sep), obj, fmt_str_sep(sep, obj, self));
case BUF:
if (!opt_compat || opt_compat > 294)
- return tostringp(obj);
+ return if3(null_or_missing_p(sep),
+ fmt_cat(tostringp(obj), sep),
+ buf_str_sep(obj, sep, self));
/* fallthrough */
default:
return if3(if3(opt_compat && opt_compat <= 174, listp(obj), seqp(obj)),