0

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

  • ok:

#'execute-extended-command

  • not ok:
#'(lambda (&optional frame) (interactive) (message "hi 8"))
phils
  • 48,657
  • 3
  • 76
  • 115
HappyFace
  • 751
  • 4
  • 16
  • 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

1 Answers1

2

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

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

"(closure (t) nil (interactive))"
rpluim
  • 4,605
  • 8
  • 22