Commit a037c171 authored by Chong Yidong's avatar Chong Yidong

Minor tweaks to the Lisp manual.

* syntax.texi (Parsing Expressions): Clarify intro.
(Parser State): Remove unnecessary statement (Bug#10661).

* eval.texi (Intro Eval): Add footnote about "sexp" terminology.

Fixes: debbugs:10657
parent 75319d7f
2012-01-31 Chong Yidong <cyd@gnu.org>
* syntax.texi (Parsing Expressions): Clarify intro (Bug#10657).
(Parser State): Remove unnecessary statement (Bug#10661).
* eval.texi (Intro Eval): Add footnote about "sexp" terminology.
2012-01-31 Glenn Morris <rgm@gnu.org>
* modes.texi (Defining Minor Modes):
......
......@@ -39,12 +39,15 @@ interpreter.
@cindex form
@cindex expression
A Lisp object that is intended for evaluation is called an
@dfn{expression} or a @dfn{form}. 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.
@cindex S-expression
A Lisp object that is intended for evaluation is called a @dfn{form}
or @dfn{expression}@footnote{It is sometimes also referred to as an
@dfn{S-expression} or @dfn{sexp}, but we generally do not use this
terminology in this manual.}. 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.
In subsequent sections, we will describe the details of what
evaluation means for each kind of form.
......@@ -96,12 +99,12 @@ interpretation. @xref{Command Loop}.
@node Forms
@section Kinds of Forms
A Lisp object that is intended to be evaluated is called a @dfn{form}.
How Emacs evaluates a form depends on its data type. Emacs has three
different kinds of form that are evaluated differently: symbols, lists,
and ``all other types.'' This section describes all three kinds, one by
one, starting with the ``all other types'' which are self-evaluating
forms.
A Lisp object that is intended to be evaluated is called a
@dfn{form} (or an @dfn{expression}). How Emacs evaluates a form
depends on its data type. Emacs has three different kinds of form
that are evaluated differently: symbols, lists, and ``all other
types.'' This section describes all three kinds, one by one, starting
with the ``all other types'' which are self-evaluating forms.
@menu
* Self-Evaluating Forms:: Forms that evaluate to themselves.
......
......@@ -606,11 +606,13 @@ expression prefix syntax class, and characters with the @samp{p} flag.
@section Parsing Expressions
This section describes functions for parsing and scanning balanced
expressions, also known as @dfn{sexps}. Basically, a sexp is either a
balanced parenthetical grouping, a string, or a symbol name (a
sequence of characters whose syntax is either word constituent or
symbol constituent). However, characters whose syntax is expression
prefix are treated as part of the sexp if they appear next to it.
expressions. We will refer to such expressions as @dfn{sexps},
following the terminology of Lisp, even though these functions can act
on languages other than Lisp. Basically, a sexp is either a balanced
parenthetical grouping, a string, or a ``symbol'' (i.e.@: a sequence
of characters whose syntax is either word constituent or symbol
constituent). However, characters whose syntax is expression prefix
are treated as part of the sexp if they appear next to it.
The syntax table controls the interpretation of characters, so these
functions can be used for Lisp expressions when in Lisp mode and for C
......@@ -830,10 +832,6 @@ The value is @code{nil} if @var{state} represents a parse which has
arrived at a top level position.
@end defun
We have provided this access function rather than document how the
data is represented in the state, because we plan to change the
representation in the future.
@node Low-Level Parsing
@subsection Low-Level Parsing
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment