From a037c17168419db7f5054a3ba080b94b9298c1a9 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 31 Jan 2012 14:51:33 +0800 Subject: [PATCH] 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 --- doc/lispref/ChangeLog | 7 +++++++ doc/lispref/eval.texi | 27 +++++++++++++++------------ doc/lispref/syntax.texi | 16 +++++++--------- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 4103dea0f8e..e2ea774fd48 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,10 @@ +2012-01-31 Chong Yidong + + * 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 * modes.texi (Defining Minor Modes): diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi index fc18e503543..e81efd10892 100644 --- a/doc/lispref/eval.texi +++ b/doc/lispref/eval.texi @@ -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. diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi index 71742e37a51..3d153e43b2d 100644 --- a/doc/lispref/syntax.texi +++ b/doc/lispref/syntax.texi @@ -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 -- 2.39.2