unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Simple stringification
@ 2010-02-22 17:36 Sean McAfee
  2010-02-22 18:01 ` Andreas Röhler
       [not found] ` <874ol95chl.fsf@galatea.lan.informatimago.com>
  0 siblings, 2 replies; 3+ messages in thread
From: Sean McAfee @ 2010-02-22 17:36 UTC (permalink / raw)
  To: help-gnu-emacs

I recently needed a function that stringifies its argument.  I wrote my
own:

(defun stringify (arg)
  (format "%s" arg))

But then I thought that Emacs probably ought to offer a standalone
function for this.  I can't find one, though.  The docs for the format
function state that the "%s" format sequence uses princ to print any
object.  However, (princ my-object) also prints the stringification of
my-object to the echo area, unless called with an additional argument,
eg. (princ my-object 'identity).

Is there in fact a function that stringifies its single argument, and
does nothing else?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-24 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-22 17:36 Simple stringification Sean McAfee
2010-02-22 18:01 ` Andreas Röhler
     [not found] ` <874ol95chl.fsf@galatea.lan.informatimago.com>
2010-02-24 20:13   ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).