all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [ELISP] How do you turn an array of chars into a string?
@ 2010-08-01 17:01 Joseph Brenner
  2010-08-01 21:52 ` Pascal J. Bourguignon
  2010-08-02 21:22 ` Stefan Monnier
  0 siblings, 2 replies; 10+ messages in thread
From: Joseph Brenner @ 2010-08-01 17:01 UTC (permalink / raw)
  To: help-gnu-emacs


The elisp manual has this example, using "kbd" to convert a (relatively)
readable string into the "internal Emacs key representation":

     (global-set-key (kbd "C-x C-\\") 'next-line)

     (global-set-key [?\C-x ?\C-\\] 'next-line)

What's the inverse of kbd?  What if you want to convert an array-of-chars
into a string?

Things like this seem to work, but only for very simple chars:

  (mapconcat 'string [?c ?a ?t] "")  ;; => "cat"

Motivation: see the first FIXME in footnote.el, on footnote-prefix.



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

end of thread, other threads:[~2010-08-04  9:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-01 17:01 [ELISP] How do you turn an array of chars into a string? Joseph Brenner
2010-08-01 21:52 ` Pascal J. Bourguignon
2010-08-01 23:07   ` Joseph Brenner
2010-08-02 21:22 ` Stefan Monnier
2010-08-02 21:55   ` Pascal J. Bourguignon
2010-08-02 22:41     ` Johan Bockgård
2010-08-02 22:57       ` Pascal J. Bourguignon
2010-08-03  9:33     ` Stefan Monnier
2010-08-03 20:57   ` Joseph Brenner
2010-08-04  9:27     ` 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.