在 Emacs 中,有一些命令可以在括号(或任何方括号)分隔的表达式之间移动光标,即前向性指数、后向性指数、前向列表和后向列表。在 Lisp 和任何其他代码中,它们的行为类似,所以我认为 *-sexp 和 *-list 之间没有区别,除了最后一个在注释或引号内不起作用。
sexp 和 list 命令之间的功能区别是什么,什么时候应该使用哪个?
以防万一,我理解 up-list 和 down-list 命令,它们与主题无关。
最佳答案
列表是 s 表达式的一个示例,因此任何对 s 表达式进行操作的函数都应该适用于列表(但不一定反之亦然,因为也存在非列表 sexp)。
elisp手册说:
A Lisp object that is intended for evaluation is called a "form" or "expression"(1). The fact that forms are data objects and not merely text is one of the fundamental differences between Lisp-like languages and typical programming languages. Any object can be evaluated, but in practice only numbers, symbols, lists and strings are evaluated very often.
---------- Footnotes ----------
(1) It is sometimes also referred to as an "S-expression" or "sexp", but we generally do not use this terminology in this manual.
C-hig (elisp) 简介评估
RET
关于emacs - Emacs 中 sexp 和 list 的区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10967850/