[Top][All Lists]

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

Re: How to make (format "%S" ...) print nothing?

From: W . Greenhouse
Subject: Re: How to make (format "%S" ...) print nothing?
Date: Sat, 12 Jul 2014 14:30:45 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Thorsten Jolitz <address@hidden> writes:

> Is there any way to use (format "%S"...) and have it print nothing
> when given an empty string, an empty list or nil (or something else)?

No. The printed representation of the empty string is "", and the
printed representation of the list () or nil is nil, so (format "%S" ...)
will of course print something in these cases. Since you know what that
something is going to be, perhaps you could use split-string or a
similar text-mangling function to remove it.

reply via email to

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