From a08eadfecc8651d6da2cdcb326d333545cb5f7c1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 6 Aug 2012 19:55:41 +0300 Subject: [PATCH] Fix bug #12138 with indexing "closures". doc/lispref/functions.texi (Closures): Put the main index entry for "closures" here. doc/lispref/variables.texi (Lexical Binding): Disambiguate the index entry for "closures". --- doc/lispref/ChangeLog | 8 ++++++++ doc/lispref/functions.texi | 3 ++- doc/lispref/variables.texi | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index ed9aab245ea..f91f99d9c3d 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,11 @@ +2012-08-06 Eli Zaretskii + + * functions.texi (Closures): Put the main index entry for + "closures" here. (Bug#12138) + + * variables.texi (Lexical Binding): Disambiguate the index entry + for "closures". + 2012-06-19 Glenn Morris * Makefile.in: Rename infodir to buildinfodir throughout. (Bug#11737) diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 5958d56686d..f1ad252f294 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -1115,8 +1115,9 @@ named function that you create (e.g.@: with @code{defun}), as well as any anonymous function that you create using the @code{lambda} macro or the @code{function} special form or the @code{#'} syntax (@pxref{Anonymous Functions}), is automatically converted into a -closure. +@dfn{closure}. +@cindex closures A closure is a function that also carries a record of the lexical environment that existed when the function was defined. When it is invoked, any lexical variable references within its definition use the diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 93fb4d5f873..5745b487942 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -968,11 +968,11 @@ wants the current value of a variable, it looks first in the lexical environment; if the variable is not specified in there, it looks in the symbol's value cell, where the dynamic value is stored. -@cindex closures +@cindex closures, example of using Lexical bindings have indefinite extent. Even after a binding construct has finished executing, its lexical environment can be ``kept around'' in Lisp objects called @dfn{closures}. A closure is -created when you create a named or anonymous function with lexical +created when you define a named or anonymous function with lexical binding enabled. @xref{Closures}, for details. When a closure is called as a function, any lexical variable -- 2.39.2