I have tried (symbol-name x), but it doesn't work if the argument is a lambda:

  • ok:


  • not ok:
#'(lambda (&optional frame) (interactive) (message "hi 8"))
  • 2
    That's why a lambda definition is called an "anonymous" function, What are you really trying to do?
    – NickD
    May 18 '20 at 12:46

I don't know why you need this, but one way is:

(format "%s" #'(lambda () (interactive)))

"(closure (t) nil (interactive))"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.