From: Tom Tromey Date: Sun, 23 Dec 2012 22:14:19 +0000 (-0700) Subject: mention let bindings and lack of other ways to rewind X-Git-Tag: emacs-26.0.90~1144^2~17^2~49 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=63d535c829a930207b64fe733228f15a554644b1;p=emacs.git mention let bindings and lack of other ways to rewind --- diff --git a/doc/lispref/threads.texi b/doc/lispref/threads.texi index d7e4b0ab2ae..9c333546040 100644 --- a/doc/lispref/threads.texi +++ b/doc/lispref/threads.texi @@ -31,6 +31,13 @@ local variables are not---a dynamic @code{let} binding is local. Each thread also has its own current buffer (@pxref{Current Buffer}) and its own match data (@pxref{Match Data}). + Note that @code{let} bindings are treated specially by the Emacs +Lisp implementation. There is no way to duplicate this unwinding and +rewinding behavior other than by using @code{let}. For example, a +manual implementation of @code{let} written using +@code{unwind-protect} cannot arrange for variable values to be +thread-specific. + In the case of lexical bindings (@pxref{Variable Scoping}), a closure is an object like any other in Emacs Lisp, and bindings in a closure are shared by any threads invoking the closure.