Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
8f4b37d8
Commit
8f4b37d8
authored
Nov 30, 2007
by
Glenn Morris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Declaring Functions): Add optional fourth
argument of declare-function, setting third argument to `t'.
parent
8fff8988
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
doc/lispref/ChangeLog
doc/lispref/ChangeLog
+5
-0
doc/lispref/functions.texi
doc/lispref/functions.texi
+11
-2
No files found.
doc/lispref/ChangeLog
View file @
8f4b37d8
2007
-
11
-
30
Glenn
Morris
<
rgm
@
gnu
.
org
>
*
functions
.
texi
(
Declaring
Functions
):
Add
optional
fourth
argument
of
declare
-
function
,
and
setting
third
argument
to
`
t
'.
2007-11-29 Glenn Morris <rgm@gnu.org>
* functions.texi (Declaring Functions): Add findex. Mention
...
...
doc/lispref/functions.texi
View file @
8f4b37d8
...
...
@@ -1266,10 +1266,11 @@ 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
arglist
@defmac declare-function function file
&optional arglist fileonly
Tell the byte compiler to assume that @var{function} is defined, with
arguments @var{arglist}, and that the definition should come from
the file @var{file}.
the file @var{file}. @var{fileonly} non-nil means only check that
@var{file} exists, not that it actually defines @var{function}.
@end defmac
To verify that these functions really are declared where
...
...
@@ -1295,6 +1296,14 @@ If you prefix the filename in the @code{declare-function} statement with
@samp{ext:}, then it will be checked if it is found, otherwise skipped
without error.
There are some function definitions that @samp{check-declare} does not
understand (e.g. @code{defstruct} and some other macros). In such cases,
you can pass a non-@code{nil} fourth argument to @code{declare-function},
meaning to only check that the file exists, not that it actually defines
the function. Note that to do this without having to specify an
argument list, you should set the third argument to @code{t} (because
@code{nil} means an empty argument list, as opposed to an unspecified one).
@node Function Safety
@section Determining whether a Function is Safe to Call
@cindex function safety
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment