all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.