aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2016-05-27 18:16:24 -0700
committerPaul Eggert2016-05-27 18:17:04 -0700
commit66cd9187e396abfa7220d6a8f8d1a7064ef20b1e (patch)
tree3a67532755b6302dcd6fee3b6f420ed3c3851646 /doc
parent4ce68f8f0f1dd1aa518e6e682b2c2cef1f49d953 (diff)
downloademacs-66cd9187e396abfa7220d6a8f8d1a7064ef20b1e.tar.gz
emacs-66cd9187e396abfa7220d6a8f8d1a7064ef20b1e.zip
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')
-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)}.
2204You don't have to specify the argument list, but if you do the 2204You don't have to specify the argument list, but if you do the
2205byte compiler can check that the calls match the declaration. 2205byte compiler can check that the calls match the declaration.
2206 2206
2207@defmac declare-function function file &rest args 2207@defmac declare-function function file &optional arglist fileonly
2208Tell the byte compiler to assume that @var{function} is defined in the 2208Tell the byte compiler to assume that @var{function} is defined in the
2209file @var{file}. The trailing arguments @var{args} can contain one or 2209file @var{file}. The optional third argument @var{arglist} is either
2210two optional arguments. The first optional argument @var{arglist} is 2210@code{t}, meaning the argument list is unspecified, or a list of
2211either @code{t}, meaning the argument list is unspecified, or a list 2211formal parameters in the same style as @code{defun}. An omitted
2212of formal parameters in the same style as @code{defun}.@footnote{An 2212@var{arglist} defaults to @code{t}, not @code{nil}; this is atypical
2213omitted @var{arglist} defaults to @code{t}, not @code{nil}; this 2213behavior for omitted arguments, and it means that to supply a fourth
2214atypical behavior is why @code{declare-function} is defined to have 2214but not third argument one must specify @code{t} for the third-argument
2215the formal parameters @code{(function file &rest args)}, not 2215placeholder instead of the usual @code{nil}. The optional fourth
2216@code{(function file &optional arglist fileonly)}.} The second 2216argument @var{fileonly} non-@code{nil} means check only that
2217optional argument @var{fileonly} non-@code{nil} means only check that
2218@var{file} exists, not that it actually defines @var{function}. 2217@var{file} exists, not that it actually defines @var{function}.
2219@end defmac 2218@end defmac
2220 2219