aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorNoam Postavsky2018-10-29 19:01:07 -0400
committerNoam Postavsky2018-11-08 20:13:56 -0500
commit39e85a0c6c8de75b446e8e4dc41cdfdca96907e3 (patch)
treea95b5bece57c76052fcad728e1de962ba2d3fee2 /lisp
parentfa605f242eec680b2c7d1374d1405510818d9103 (diff)
downloademacs-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 'lisp')
-rw-r--r--lisp/subr.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 59f6949b211..d09789340fc 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -93,12 +93,13 @@ Info node `(elisp)Specification List' for details."
93 `(put (quote ,symbol) 'edebug-form-spec (quote ,spec))) 93 `(put (quote ,symbol) 'edebug-form-spec (quote ,spec)))
94 94
95(defmacro lambda (&rest cdr) 95(defmacro lambda (&rest cdr)
96 "Return a lambda expression. 96 "Return an anonymous function.
97A call of the form (lambda ARGS DOCSTRING INTERACTIVE BODY) is 97Under dynamic binding, a call of the form (lambda ARGS DOCSTRING
98self-quoting; the result of evaluating the lambda expression is the 98INTERACTIVE BODY) is self-quoting; the result of evaluating the
99expression itself. The lambda expression may then be treated as a 99lambda expression is the expression itself. Under lexical
100function, i.e., stored as the function value of a symbol, passed to 100binding, the result is a closure. Regardless, the result is a
101`funcall' or `mapcar', etc. 101function, i.e., it may be stored as the function value of a
102symbol, passed to `funcall' or `mapcar', etc.
102 103
103ARGS should take the same form as an argument list for a `defun'. 104ARGS should take the same form as an argument list for a `defun'.
104DOCSTRING is an optional documentation string. 105DOCSTRING is an optional documentation string.