aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-12-27 16:47:15 -0800
committerGlenn Morris2013-12-27 16:47:15 -0800
commitc04d52fbc95fd8f5b44a391f1ce5b8224fcd55d8 (patch)
treeffa10ef3aaa6367ef3d0bead4b9d5e48b5a46876
parentad15bd74e4639fcf768498276bf1bafffa128577 (diff)
downloademacs-c04d52fbc95fd8f5b44a391f1ce5b8224fcd55d8.tar.gz
emacs-c04d52fbc95fd8f5b44a391f1ce5b8224fcd55d8.zip
* doc/lispref/control.texi (Pattern matching case statement): Brevity.
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/control.texi8
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index c4fdfb18a9b..b86ab722764 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
12013-12-28 Glenn Morris <rgm@gnu.org>
2
3 * control.texi (Pattern matching case statement): Brevity.
4
12013-12-27 Chong Yidong <cyd@gnu.org> 52013-12-27 Chong Yidong <cyd@gnu.org>
2 6
3 * functions.texi (Function Cells): 7 * functions.texi (Function Cells):
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index f5cdd3dc80f..5bd2d7acdbe 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -322,7 +322,8 @@ In the last clause, @code{code} is a variable that gets bound to the value that
322was returned by @code{(get-return-code x)}. 322was returned by @code{(get-return-code x)}.
323 323
324To give a more complex example, a simple interpreter for a little 324To give a more complex example, a simple interpreter for a little
325expression language could look like: 325expression language could look like (note that this example requires
326lexical-binding):
326 327
327@example 328@example
328(defun evaluate (exp env) 329(defun evaluate (exp env)
@@ -342,11 +343,6 @@ third elements and binds them to the variables @code{x} and @code{y}.
342@code{(pred numberp)} is a pattern that simply checks that @code{exp} 343@code{(pred numberp)} is a pattern that simply checks that @code{exp}
343is a number, and @code{_} is the catch-all pattern that matches anything. 344is a number, and @code{_} is the catch-all pattern that matches anything.
344 345
345Note that the the lambda being the result of the @code{fn} clause is a
346closure (@pxref{Closures}), so the file defining @code{evaluate} must
347have lexical binding enabled (@pxref{Using Lexical Binding}, for how
348to enable it).
349
350Here are some sample programs including their evaluation results: 346Here are some sample programs including their evaluation results:
351 347
352@example 348@example