0

I want to convert keywords, e.g. :some-key to a plain symbol like some-key. I currently do this with:

(intern-soft (substring (symbol-name :some-key) 1))

Is there a better way?

  • 1
    Why do you want to do that? Perhaps it could be avoided altogether? (Fwiw I don't know of a better way) – YoungFrog Apr 29 '17 at 20:18
  • 2
    You already show a trivial way to do what you want. What do you have in mind wrt a "canonical" way, and why? Is there some other question hiding here, or is this the question, to which the answer is just "no"? – Drew Apr 29 '17 at 20:39
  • The answer could be no. It seems like there might be a built-in function I wasn't aware of. – John Kitchin Apr 29 '17 at 20:53
  • There is no other question. I was doing this to convert a plist to the body of a let inside a macro. – John Kitchin Apr 29 '17 at 20:54

Your Answer

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

Browse other questions tagged or ask your own question.