Q: How does one create and use :keywords
?
Consider a (naive, apparently) attempt to access the following toy alist:
(setf alist '((:key-1 "Key no. 1")
(:key-2 "Key no. 2")))
(assq :key-1 alist) ; => (:key-1 "Key no. 1")
(assq (make-symbol ":key-1") alist) ; => nil
The first key works as expected, but the second key does not. Insofar as there is no obvious make-keyword
function, how does one create and use a keyword?
Original motivation: I need to transform a string into a lookup key that is a symbol onto which I can put
properties.
In the process of formulating this question, I've gotten to at least part of the answer, which I'm posting separately. I'm hoping brighter minds than mine can improve upon it.