Andreas Röhler<andreas.roehler@easy-emacs.de> writes:
Am 28.02.2011 16:20, schrieb ken:
(car '("one" "two" "three"))
prints out "one" ... the first of the list. How to print out all
elements of the list (in order and with the double quotes around them?
I'm actually looking just to substitute something for "car" and not
write an entire function. Or is there no such thing?
Thanks much.
and still a form delivering with doublequotes...
(let ((my-list (list "one" "two" "three")))
(dolist (elem my-list)
(insert (format "\n\"%s\"" elem))))
Why do you write broken code?
(let ((my-list (list "o\"n\"e" "t\"wo" "th\\\"ree")))
(dolist (elem my-list)
(insert (format "\n\"%s\"" elem))))
"o"n"e"
"t"wo"
"th\"ree"
Is it not easier to write code that works?
(let ((my-list (list "o\"n\"e" "t\"wo" "th\\\"ree")))
(dolist (elem my-list)
(insert (format "\n%s" (prin1-to-string elem)))))
"o\"n\"e"
"t\"wo"
"th\\\"ree"