emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 6b9f9df9454: ; Improve documentation of 'declare-function'


From: Eli Zaretskii
Subject: emacs-29 6b9f9df9454: ; Improve documentation of 'declare-function'
Date: Wed, 5 Apr 2023 05:31:07 -0400 (EDT)

branch: emacs-29
commit 6b9f9df9454a59b74790c402916df8628bb9d477
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; Improve documentation of 'declare-function'
    
    * doc/lispref/functions.texi (Declaring Functions):
    * lisp/subr.el (declare-function): Document explicitly that
    ARGLIST argument, if provided, should include the parentheses.
---
 doc/lispref/functions.texi | 15 ++++++++-------
 lisp/subr.el               |  3 ++-
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 551e743a653..948c6bb96f8 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -2688,13 +2688,14 @@ byte compiler can check that the calls match the 
declaration.
 Tell the byte compiler to assume that @var{function} is defined in the
 file @var{file}.  The optional third argument @var{arglist} is either
 @code{t}, meaning the argument list is unspecified, or a list of
-formal parameters in the same style as @code{defun}.  An omitted
-@var{arglist} defaults to @code{t}, not @code{nil}; this is atypical
-behavior for omitted arguments, and it means that to supply a fourth
-but not third argument one must specify @code{t} for the third-argument
-placeholder instead of the usual @code{nil}.  The optional fourth
-argument @var{fileonly} non-@code{nil} means check only that
-@var{file} exists, not that it actually defines @var{function}.
+formal parameters in the same style as @code{defun} (including the
+parentheses).  An omitted @var{arglist} defaults to @code{t}, not
+@code{nil}; this is atypical behavior for omitted arguments, and it
+means that to supply a fourth but not third argument one must specify
+@code{t} for the third-argument placeholder instead of the usual
+@code{nil}.  The optional fourth argument @var{fileonly}
+non-@code{nil} means check only that @var{file} exists, not that it
+actually defines @var{function}.
 @end defmac
 
 @findex check-declare-file
diff --git a/lisp/subr.el b/lisp/subr.el
index 131ed110149..2e31929e548 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -45,7 +45,8 @@ declaration.  A FILE with an \"ext:\" prefix is an external 
file.
 `check-declare' will check such files if they are found, and skip
 them without error if they are not.
 
-Optional ARGLIST specifies FN's arguments, or is t to not specify
+Optional ARGLIST specifies FN's arguments, in the same form as
+in `defun' (including the parentheses); or it is t to not specify
 FN's arguments.  An omitted ARGLIST defaults to t, not nil: a nil
 ARGLIST specifies an empty argument list, and an explicit t
 ARGLIST is a placeholder that allows supplying a later arg.



reply via email to

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