Skip to content

Commit 84a3da1

Browse files
author
Michael Heerdegen
committed
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.
1 parent a564d6e commit 84a3da1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

doc/lispref/functions.texi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,10 @@ a byte-code function object (@pxref{Byte Compilation}).
11221122
When lexical binding is enabled, @var{function-object} is converted
11231123
into a closure. @xref{Closures}.
11241124
@end itemize
1125+
1126+
When @var{function-object} is a symbol and the code is byte compiled,
1127+
the byte-compiler will warn if that function is not defined or might
1128+
not be known at run time.
11251129
@end defspec
11261130

11271131
@cindex @samp{#'} syntax

src/eval.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,8 @@ usage: (quote ARG) */)
544544

545545
DEFUN ("function", Ffunction, Sfunction, 1, UNEVALLED, 0,
546546
doc: /* Like `quote', but preferred for objects which are functions.
547-
In byte compilation, `function' causes its argument to be compiled.
548-
`quote' cannot do that.
547+
In byte compilation, `function' causes its argument to be handled by
548+
the byte compiler. `quote' cannot do that.
549549
usage: (function ARG) */)
550550
(Lisp_Object args)
551551
{

0 commit comments

Comments
 (0)