[Sawfish] How to use `prin1-to-string' to generate elisp expr string

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


I want to use prin1-to-string to generate a elisp expr string, for example:

#+BEGIN_EXAMPLE
(prin1-to-string '(`(test ,(concat "aaa" "bbb"))))
#+END_EXAMPLE

Result expected is :

#+BEGIN_EXAMPLE
"(`(test ,(concat \"aaa\" \"bbb\")))"
#+END_EXAMPLE

but, the real result is;

#+BEGIN_EXAMPLE
"((backquote (test (backquote-unquote (concat \"aaa\" \"bbb\")))))"
#+END_EXAMPLE

this is not a valid elisp expression string,

How to solve the problem? thanks.

-- 


--
Sawfish ML


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/