diff options
| author | Noam Postavsky | 2018-10-29 19:01:07 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2018-11-08 20:13:56 -0500 |
| commit | 39e85a0c6c8de75b446e8e4dc41cdfdca96907e3 (patch) | |
| tree | a95b5bece57c76052fcad728e1de962ba2d3fee2 /doc | |
| parent | fa605f242eec680b2c7d1374d1405510818d9103 (diff) | |
| download | emacs-39e85a0c6c8de75b446e8e4dc41cdfdca96907e3.tar.gz emacs-39e85a0c6c8de75b446e8e4dc41cdfdca96907e3.zip | |
Note that lex bound lambda forms are not self-quoting (Bug#33199)
* doc/lispref/functions.texi (Anonymous Functions):
* lisp/subr.el (lambda): Note that under lexical binding a lambda form
yields a closure object (Bug#33199).
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/functions.texi | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 242d754dea9..216666c713a 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi | |||
| @@ -1082,15 +1082,18 @@ This macro returns an anonymous function with argument list | |||
| 1082 | @var{args}, documentation string @var{doc} (if any), interactive spec | 1082 | @var{args}, documentation string @var{doc} (if any), interactive spec |
| 1083 | @var{interactive} (if any), and body forms given by @var{body}. | 1083 | @var{interactive} (if any), and body forms given by @var{body}. |
| 1084 | 1084 | ||
| 1085 | In effect, this macro makes @code{lambda} forms self-quoting: | 1085 | Under dynamic binding, this macro effectively makes @code{lambda} |
| 1086 | evaluating a form whose @sc{car} is @code{lambda} yields the form | 1086 | forms self-quoting: evaluating a form whose @sc{car} is @code{lambda} |
| 1087 | itself: | 1087 | yields the form itself: |
| 1088 | 1088 | ||
| 1089 | @example | 1089 | @example |
| 1090 | (lambda (x) (* x x)) | 1090 | (lambda (x) (* x x)) |
| 1091 | @result{} (lambda (x) (* x x)) | 1091 | @result{} (lambda (x) (* x x)) |
| 1092 | @end example | 1092 | @end example |
| 1093 | 1093 | ||
| 1094 | Note that when evaluting under lexical binding the result is a closure | ||
| 1095 | object (@pxref{Closures}). | ||
| 1096 | |||
| 1094 | The @code{lambda} form has one other effect: it tells the Emacs | 1097 | The @code{lambda} form has one other effect: it tells the Emacs |
| 1095 | evaluator and byte-compiler that its argument is a function, by using | 1098 | evaluator and byte-compiler that its argument is a function, by using |
| 1096 | @code{function} as a subroutine (see below). | 1099 | @code{function} as a subroutine (see below). |