[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELISP] How do you turn an array of chars into a string?
From: |
Joseph Brenner |
Subject: |
[ELISP] How do you turn an array of chars into a string? |
Date: |
Wed, 08 Dec 2010 15:22:12 -0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
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.
- [ELISP] How do you turn an array of chars into a string?,
Joseph Brenner <=