[Sawfish] How to use `prin1-to-string' to generate elisp expr string |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/sawfish Archives
]
- To: sawfish@xxxxxxxxxxxxxxxxxxx
- Subject: [Sawfish] How to use `prin1-to-string' to generate elisp expr string
- From: Feng Shu <tumashu@xxxxxxx>
- Date: Fri, 08 May 2015 15:55:40 +0800
- Cc: Feng Shu <tumashu@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=ctT2G E7/lyhUk3dv9ewt4cJ0iUkGMNzOTFOR3egk7lQ=; b=VKUiSlzMaIvGEuFPLbrMf t6YMNeQNeFPBAJFC94a1DPpUMAbyMlFV+SNJJfK+J3zpNXux/lAvnyWiOUrirQYP OJhLi5ikSXSaqX4AxVAhN5vuhg2LH0UVGij+T6XR1V0m5QAzJaH/c7g03f8DCvgv 291D/AwipH/dUjCfHaTdzw=
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