summaryrefslogtreecommitdiff
path: root/doc/lispref/functions.texi
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-05-27 18:16:24 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-05-27 18:17:04 -0700
commit66cd9187e396abfa7220d6a8f8d1a7064ef20b1e (patch)
tree3a67532755b6302dcd6fee3b6f420ed3c3851646 /doc/lispref/functions.texi
parent4ce68f8f0f1dd1aa518e6e682b2c2cef1f49d953 (diff)
downloademacs-66cd9187e396abfa7220d6a8f8d1a7064ef20b1e.tar.gz
Don’t document declare-function internals
Suggested by Stefan Monnier in: http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00618.html * doc/lispref/functions.texi (Declaring Functions): * lisp/subr.el (declare-function): * lisp/emacs-lisp/bytecomp.el: (byte-compile-macroexpand-declare-function): Document as (fn file &optional arglist fileonly) even though it is really (fn file &rest args).
Diffstat (limited to 'doc/lispref/functions.texi')
-rw-r--r--doc/lispref/functions.texi19
1 files changed, 9 insertions, 10 deletions
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 7513adfbbef..fff4ac0ee8d 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -2204,17 +2204,16 @@ cases, this might be something like @code{(file &optional overwrite)}.
You don't have to specify the argument list, but if you do the
byte compiler can check that the calls match the declaration.
-@defmac declare-function function file &rest args
+@defmac declare-function function file &optional arglist fileonly
Tell the byte compiler to assume that @var{function} is defined in the
-file @var{file}. The trailing arguments @var{args} can contain one or
-two optional arguments. The first optional 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}.@footnote{An
-omitted @var{arglist} defaults to @code{t}, not @code{nil}; this
-atypical behavior is why @code{declare-function} is defined to have
-the formal parameters @code{(function file &rest args)}, not
-@code{(function file &optional arglist fileonly)}.} The second
-optional argument @var{fileonly} non-@code{nil} means only check that
+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}.
@end defmac