Improve documentation of the 'function' special form
Point out that 'function' quoting is beneficial also for symbols. * src/eval.c (function): Enhance docstring. * doc/lispref/functions.texi (Anonymous Functions): Improve documentation.
This commit is contained in:
parent
a564d6e8bb
commit
84a3da15e9
2 changed files with 6 additions and 2 deletions
|
@ -1122,6 +1122,10 @@ a byte-code function object (@pxref{Byte Compilation}).
|
|||
When lexical binding is enabled, @var{function-object} is converted
|
||||
into a closure. @xref{Closures}.
|
||||
@end itemize
|
||||
|
||||
When @var{function-object} is a symbol and the code is byte compiled,
|
||||
the byte-compiler will warn if that function is not defined or might
|
||||
not be known at run time.
|
||||
@end defspec
|
||||
|
||||
@cindex @samp{#'} syntax
|
||||
|
|
|
@ -544,8 +544,8 @@ usage: (quote ARG) */)
|
|||
|
||||
DEFUN ("function", Ffunction, Sfunction, 1, UNEVALLED, 0,
|
||||
doc: /* Like `quote', but preferred for objects which are functions.
|
||||
In byte compilation, `function' causes its argument to be compiled.
|
||||
`quote' cannot do that.
|
||||
In byte compilation, `function' causes its argument to be handled by
|
||||
the byte compiler. `quote' cannot do that.
|
||||
usage: (function ARG) */)
|
||||
(Lisp_Object args)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue