bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19975: 25.0.50; Add %s-like descriptor to `format' that treats nil l


From: Drew Adams
Subject: bug#19975: 25.0.50; Add %s-like descriptor to `format' that treats nil like empty string
Date: Sun, 1 Mar 2015 23:07:13 -0800 (PST)

> > Enhancement request.  Add a new format descriptor to `format' that would
> > behave just like %s except that a nil argument would be treated as if it
> > were "".
> 
> It's easy enough to use (or foo "").

Yes of course "it's easy enough".  That's what we've all been
doing for decades.  It would be even clearer and simpler still
to have a format descriptor for this common use case.

That is what this enhancement request is about - not needing to
write such "easy enough" code.

And of course it is not always (or foo "").
It might well be (if foo "whatever" "").  Or if you prefer,
(let ((bar "whatever")) (or (and foo bar) "")).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]