考虑一个评估名称为字符串的变量的问题:
(defun string-dereference ()
(interactive)
(let ((myStr "rst-adjust"))
;; (describe-function 'myStr) => Symbol's function definition is void: myStr
;; (funcall (format "(describe-function '%s)" myStr) => Invalid function: "(describe-function 'rst-adjust)")
)
虽然以下工作
(describe-function 'rst-adjust)
rst-adjust
给定的存储在字符串中,我该怎么做?
编辑:
答案是:
(describe-function (intern myStr))