Reputation: 886
I need the quoted value of a variable.
For example, let's say we have the variables qwe
and asd
:
(setq qwe '(1 2 3)) ;; qwe is set to (1 2 3)
(setq asd ''(1 2 3)) ;; asd is set to '(1 2 3)
My question is: how do I achieve the same value for asd
by using qwe
?
I did it this way:
(setq asd `(quote ,qwe))
;; Now asd is '(1 2 3)
But it looks ugly and bad to me. I'll be surprised if there isn't a better way.
Upvotes: 3
Views: 294
Reputation: 60054
You are looking for
(setq asd `',qwe)
which is, in fact, equivalent to
(setq asd `(quote ,qwe))
Upvotes: 5