diff options
| author | Paul Eggert | 2016-05-27 18:16:24 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-05-27 18:17:04 -0700 |
| commit | 66cd9187e396abfa7220d6a8f8d1a7064ef20b1e (patch) | |
| tree | 3a67532755b6302dcd6fee3b6f420ed3c3851646 /doc | |
| parent | 4ce68f8f0f1dd1aa518e6e682b2c2cef1f49d953 (diff) | |
| download | emacs-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.texi | 19 |
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)}. | |||
| 2204 | You don't have to specify the argument list, but if you do the | 2204 | You don't have to specify the argument list, but if you do the |
| 2205 | byte compiler can check that the calls match the declaration. | 2205 | byte 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 |
| 2208 | Tell the byte compiler to assume that @var{function} is defined in the | 2208 | Tell the byte compiler to assume that @var{function} is defined in the |
| 2209 | file @var{file}. The trailing arguments @var{args} can contain one or | 2209 | file @var{file}. The optional third argument @var{arglist} is either |
| 2210 | two optional arguments. The first optional argument @var{arglist} is | 2210 | @code{t}, meaning the argument list is unspecified, or a list of |
| 2211 | either @code{t}, meaning the argument list is unspecified, or a list | 2211 | formal parameters in the same style as @code{defun}. An omitted |
| 2212 | of formal parameters in the same style as @code{defun}.@footnote{An | 2212 | @var{arglist} defaults to @code{t}, not @code{nil}; this is atypical |
| 2213 | omitted @var{arglist} defaults to @code{t}, not @code{nil}; this | 2213 | behavior for omitted arguments, and it means that to supply a fourth |
| 2214 | atypical behavior is why @code{declare-function} is defined to have | 2214 | but not third argument one must specify @code{t} for the third-argument |
| 2215 | the formal parameters @code{(function file &rest args)}, not | 2215 | placeholder instead of the usual @code{nil}. The optional fourth |
| 2216 | @code{(function file &optional arglist fileonly)}.} The second | 2216 | argument @var{fileonly} non-@code{nil} means check only that |
| 2217 | optional 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 | ||