emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 84a3da1: Improve documentation of the 'function' sp


From: Michael Heerdegen
Subject: [Emacs-diffs] master 84a3da1: Improve documentation of the 'function' special form
Date: Thu, 23 May 2019 19:15:08 -0400 (EDT)

branch: master
commit 84a3da15e96504cfcbaf295cfb0babca8d8700e5
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    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.
---
 doc/lispref/functions.texi | 4 ++++
 src/eval.c                 | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 97f7fb9..2f9d898 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 567c32e..5bba876 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)
 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]