【发布时间】:2009-11-02 22:42:41
【问题描述】:
这可能很愚蠢,但我没有足够的 Elisp 知识来理解引用和评估方面的情况。
假设我有这个 Elisp 代码:
(add-to-list 'default-frame-alist '(width . 100))
(add-to-list 'default-frame-alist '(height . 50))
这将导致预期的 default-frame-alist 值:
((height 50)
(width 100))
但是现在如果我有这个:
(setq my-frame-width 100)
(setq my-frame-height 50)
(add-to-list 'default-frame-alist '(width . my-frame-width))
(add-to-list 'default-frame-alist '(height . my-frame-height))
这将导致 -
((height my-frame-height)
(width my-frame-width))
并且,从框架几何来看,从不评估这些变量。如何使 my-frame-width 和 height 的实际值出现在此 alist 中?我的引号太多了吗?但我无法从添加到列表评估中删除任何内容...
【问题讨论】:
标签: elisp