From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jay Belanger" Newsgroups: gmane.emacs.devel Subject: Re: byte-compiler warnings about undefined functions can now be silenced Date: Mon, 19 Nov 2007 13:33:33 -0600 Message-ID: References: <18240.56136.448503.860758@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1195500839 4456 80.91.229.12 (19 Nov 2007 19:33:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Nov 2007 19:33:59 +0000 (UTC) Cc: belanger@truman.edu To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 19 20:33:56 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IuCNX-0000Bk-Ds for ged-emacs-devel@m.gmane.org; Mon, 19 Nov 2007 20:33:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IuCNJ-0003AK-JX for ged-emacs-devel@m.gmane.org; Mon, 19 Nov 2007 14:33:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IuCNF-00036E-S8 for emacs-devel@gnu.org; Mon, 19 Nov 2007 14:33:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IuCNE-00032K-Cq for emacs-devel@gnu.org; Mon, 19 Nov 2007 14:33:37 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IuCNE-000323-9Y for emacs-devel@gnu.org; Mon, 19 Nov 2007 14:33:36 -0500 Original-Received: from ik-out-1112.google.com ([66.249.90.179]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IuCND-00050f-Ti for emacs-devel@gnu.org; Mon, 19 Nov 2007 14:33:36 -0500 Original-Received: by ik-out-1112.google.com with SMTP id c29so1143630ika for ; Mon, 19 Nov 2007 11:33:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=xlc/6LkSY2RrFTB/FBh3+8wFpS7GaPapzrLHbYxeR+I=; b=jKVEzqEdgHApzijxFk48AxydLl9lqCeIWZ1HSIgM6XuRSUMcaQBBMfhJ5Ql0Fyh8lfKFGopNRwnXMW4Wzf+YNy4Z631zx+1hGIiURYlZQFhY+QcEMz2u5EmW+aAY+MJGQsPqtPT+OQLW3OV9UFNkCVtNH+BLEsEb+FsPzBkfKaY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=B1dNy7LAd4elMvOefzC+a5GAzRBpf+dlT5q88x0cwfmZQoJlhJ7YjvO8hr9iZ5NWwMtt98tHGlhRnhl+LqUnHm4J7OFHbtA1MG8V+p0jZmbbM7yFwp3jr1JFvqqFKhB+2S0PKCSPtpXMb9i375ERVDrX2EYyLJD9DHtlsCeVWik= Original-Received: by 10.78.170.6 with SMTP id s6mr5684439hue.1195500813501; Mon, 19 Nov 2007 11:33:33 -0800 (PST) Original-Received: by 10.78.70.5 with HTTP; Mon, 19 Nov 2007 11:33:33 -0800 (PST) In-Reply-To: <18240.56136.448503.860758@fencepost.gnu.org> Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:83683 Archived-At: > Dan Nicolaescu wrote: ... > When bootstrapping, there are lots of messages about functions that > are "not known to be defined". The compiler is technically correct, but > the code is usually such that when it actually runs, the function will > be defined. ... > All you need to do is add a `declare-function' statement before the > first use of the function in question: > > (declare-function gud-find-c-expr "gud.el" nil) > > This says that gud-find-c-expr is defined in "gud.el" (the `.el' can > be omitted). The file path is either absolute, or relative to the one > with the declare-function statement (e.g. "../files.el"). ... > You don't have to specify the argument list, but if you do the > byte-compiler will check that the calls match the declaration. Is there any reason the filename isn't optional, too? `check-declare-file' wouldn't be able to check anything in that case, of course, but it could still keep the byte-compiler quiet. Jay