From: Tassilo Horn <tsdh@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: How do I clean up "might not be defined" wrnings?
Date: Fri, 21 Nov 2014 22:58:13 +0100 [thread overview]
Message-ID: <87h9xs8bd6.fsf@thinkpad-t440p.tsdh.org> (raw)
In-Reply-To: <20141121192849.B55E1382F6B@snark.thyrsus.com> (Eric S. Raymond's message of "Fri, 21 Nov 2014 14:28:49 -0500 (EST)")
esr@snark (Eric S. Raymond) writes:
> I've started a significant refactoring and simplification of the VC
> code. This has involved moving functions to different files, which is
> causing "functions might not be defined" warnings.
>
> What is the approved way to prevent these or clean them up?
,----[ C-h f declare-function RET ]
| declare-function is a Lisp macro in `subr.el'.
|
| (declare-function FN FILE &optional ARGLIST FILEONLY)
|
| Tell the byte-compiler that function FN is defined, in FILE.
| Optional ARGLIST is the argument list used by the function.
| The FILE argument is not used by the byte-compiler, but by the
| `check-declare' package, which checks that FILE contains a
| definition for FN. ARGLIST is used by both the byte-compiler
| and `check-declare' to check for consistency.
|
| FILE can be either a Lisp file (in which case the ".el"
| extension is optional), or a C file. C files are expanded
| relative to the Emacs "src/" directory. Lisp files are
| searched for using `locate-library', and if that fails they are
| expanded relative to the location of the file containing the
| 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.
|
| FILEONLY non-nil means that `check-declare' will only check that
| FILE exists, not that it defines FN. This is intended for
| function-definitions that `check-declare' does not recognize, e.g.
| `defstruct'.
|
| To specify a value for FILEONLY without passing an argument list,
| set ARGLIST to t. This is necessary because nil means an
| empty argument list, rather than an unspecified one.
|
| Note that for the purposes of `check-declare', this statement
| must be the first non-whitespace on a line.
|
| For more information, see Info node `(elisp)Declaring Functions'.
`----
Bye,
Tassilo
next prev parent reply other threads:[~2014-11-21 21:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-21 19:28 How do I clean up "might not be defined" wrnings? Unknown
2014-11-21 21:58 ` Tassilo Horn [this message]
2014-11-21 22:03 ` Eric S. Raymond
2014-11-22 5:53 ` Stephen J. Turnbull
2014-11-21 22:14 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h9xs8bd6.fsf@thinkpad-t440p.tsdh.org \
--to=tsdh@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.