From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: How do I clean up "might not be defined" wrnings? Date: Fri, 21 Nov 2014 22:58:13 +0100 Message-ID: <87h9xs8bd6.fsf@thinkpad-t440p.tsdh.org> References: <20141121192849.B55E1382F6B@snark.thyrsus.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416607130 14459 80.91.229.3 (21 Nov 2014 21:58:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Nov 2014 21:58:50 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 21 22:58:39 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XrwDr-0000fX-NM for ged-emacs-devel@m.gmane.org; Fri, 21 Nov 2014 22:58:35 +0100 Original-Received: from localhost ([::1]:42604 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrwDr-0001iw-Db for ged-emacs-devel@m.gmane.org; Fri, 21 Nov 2014 16:58:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrwDi-0001in-R8 for emacs-devel@gnu.org; Fri, 21 Nov 2014 16:58:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrwDc-0004xL-IS for emacs-devel@gnu.org; Fri, 21 Nov 2014 16:58:26 -0500 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:42541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrwDc-0004wU-Ep for emacs-devel@gnu.org; Fri, 21 Nov 2014 16:58:20 -0500 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 1022820674 for ; Fri, 21 Nov 2014 16:58:20 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Fri, 21 Nov 2014 16:58:20 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:subject:in-reply-to :references:date:message-id:mime-version:content-type; s= smtpout; bh=w9LxcocKd5wh593N3NMDld/iQ2s=; b=M2UlmX7njA/CrDTs+IXj BGVhoHNO69Hsts89WvhaaZxUM5gcQay+qDgmzLGf8iM1rXhUUGboknlA2YjyHdp8 vK48eOG6o+AmWlCCbR2/isZeiaWr7+bcEzPbXM+ck+fmvEPJme6C+x97yGw4AlP4 oW7btYQhOETSKMLxFLD5j2c= X-Sasl-enc: uNDorDjl2KEZVDWTmyq/js00YkKvC1DwovnFK8bDdlUh 1416607099 Original-Received: from thinkpad-t440p.tsdh.org (unknown [2.163.251.229]) by mail.messagingengine.com (Postfix) with ESMTPA id 4C36EC00006 for ; Fri, 21 Nov 2014 16:58:19 -0500 (EST) In-Reply-To: <20141121192849.B55E1382F6B@snark.thyrsus.com> (Eric S. Raymond's message of "Fri, 21 Nov 2014 14:28:49 -0500 (EST)") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) Mail-Followup-To: esr@snark (Eric S. Raymond), emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.111.4.28 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:177959 Archived-At: 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