Emacs / Common Lisp:引用变量的值

时间:2016-04-05 16:23:31

标签: emacs lisp

我需要变量的引用值。

例如,我们假设我们有变量qweasd

(setq qwe '(1 2 3)) ;; qwe is set to (1 2 3)
(setq asd ''(1 2 3)) ;; asd is set to '(1 2 3)

我的问题是:如何使用asdqwe获得相同的价值?

我是这样做的:

(setq asd `(quote ,qwe))
;; Now asd is '(1 2 3)

但它对我来说看起来很丑陋。如果没有更好的方法,我会感到惊讶。

1 个答案:

答案 0 :(得分:4)

您正在寻找

bind

实际上是equivalent

(setq asd `',qwe)