Emacs 如何知道何时使用括号

Emacs 如何知道何时使用括号,emacs,elisp,Emacs,Elisp,我正在通读,我看到以下内容: 此代码适用于: (message "The name of this buffer is: %s." (buffer-name)) (message "The value of fill-column is %d." fill-column) 虽然这一次失败了: (message "The name of this buffer is: %s." buffer-name) (message "The value of fill-column is %d." (

我正在通读,我看到以下内容:

此代码适用于:

(message "The name of this buffer is: %s." (buffer-name))
(message "The value of fill-column is %d." fill-column)
虽然这一次失败了:

(message "The name of this buffer is: %s." buffer-name)
(message "The value of fill-column is %d." (fill-column))
但是,该代码在以下情况下起作用:

(message "The name of this buffer is: %s." (buffer-name))
(message "The value of fill-column is %d." fill-column)
虽然这一次失败了:

(message "The name of this buffer is: %s." buffer-name)
(message "The value of fill-column is %d." (fill-column))

我的问题是为什么?
缓冲区名称
填充列
之间有什么区别?如何知道何时使用括号?

简单地说-
缓冲区名称
是一个函数(返回字符串),而
填充列
是一个变量(计算结果为整数)

所有Lisp方言中的函数调用都应该用括号括起来

要查看Emacs中函数的详细信息,请按C-h f函数名RET。
要查看Emacs中变量的详细信息,请按C-h v variable name RET.

谢谢。这很有道理。有没有一种方法可以交互地知道给定的符号是函数、变量还是其他东西?(即使用
C-x C-e
或任何等效命令)我建议使用
M-x ielm
在交互式shell中试验Emacs Lisp。user273158:注意,elisp符号既有一个值槽,也有一个函数槽,这意味着给定的符号(可能)既可以用作变量,也可以用作函数。以交互方式,
C-hv
显示变量的帮助和
C-hf
函数的帮助。非交互式地,函数
boundp
fboundp
告诉您是否分别填充了给定符号的值和函数槽。(某些名称),C-x C-e将计算变量值some name;(某个名称),C-x C-e将计算某个名称的函数;(symbol function'some name)将返回函数值。