From: Michael Heerdegen Date: Sat, 27 Apr 2019 07:40:10 +0000 (+0200) Subject: Improve documentation of the 'function' special form X-Git-Tag: emacs-27.0.90~2805^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=84a3da15e96504cfcbaf295cfb0babca8d8700e5;p=emacs.git 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. --- diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 97f7fb9f79e..2f9d898c9b0 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -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 diff --git a/src/eval.c b/src/eval.c index 567c32e0d75..5bba8766373 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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) {