【发布时间】:2012-09-04 19:44:02
【问题描述】:
我正在关注 elisp 的介绍。非常第一章。这是我从 html 书中复制/粘贴的两个示例。我已经评估了这两种形式,在这里我从 *Messages* 缓冲区复制/粘贴返回值和输出作为副作用(我不知道如何复制迷你缓冲区内容)。
第一种形式
(let ((zebra 'stripes)
(tiger 'fierce))
(message "One kind of animal has %s and another is %s."
zebra tiger))
来自 *Messages* 的输出
One kind of animal has stripes and another is fierce.
#("One kind of animal has stripes and another is fierce." 23 30 (fontified t))
第二种形式
(let ((birch 3)
pine
fir
(oak 'some))
(message "Here are %d variables with %s, %s and %s value."
birch pine fir oak))
*Messages* 的输出是:
Here are 3 variables with nil, nil and some value.
"Here are 3 variables with nil, nil and some value."
为什么第一个表单返回一个 lambda 值? 是什么让第一种形式如此特别以至于返回的值不会是字符串?
【问题讨论】: