]> git.eshelyaron.com Git - emacs.git/commitdiff
* Document function type declarations
authorAndrea Corallo <acorallo@gnu.org>
Mon, 29 Apr 2024 16:08:57 +0000 (18:08 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 6 May 2024 16:29:18 +0000 (18:29 +0200)
* doc/lispref/functions.texi (Declare Form): Document function type
declaration.

(cherry picked from commit 15016288ecaefbfb2822c1fcef7146a5d8663650)

doc/lispref/functions.texi

index c57de08460faed4dcaec36aac982f83e9fba89ba..b5e234fa06817a7c1026e1ebab81c82f0b165e28 100644 (file)
@@ -2709,6 +2709,13 @@ native code emitted for the function.  In particular, if @var{n} is
 @minus{}1, native compilation of the function will emit bytecode
 instead of native code for the function.
 
+@item (type @var{type})
+Declare @var{type} to be the type of this function.  This is used for
+documentation by @code{describe-function}.  Also it can be used by the
+native compiler (@pxref{Native-Compilation}) for improving code
+generation and for deriving more precisely the type of other functions
+without type declaration.
+
 @item no-font-lock-keyword
 This is valid for macros only.  Macros with this declaration are
 highlighted by font-lock (@pxref{Font Lock Mode}) as normal functions,