From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: suppressing byte-compiler warnings about undefined functions Date: Sun, 11 Nov 2007 16:10:42 +0000 Message-ID: <20071111161042.GA1653@muc.de> References: <20071111084614.GB1038@muc.de> <200711111551.lABFpS6L011370@oogie-boogie.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194797080 14012 80.91.229.12 (11 Nov 2007 16:04:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2007 16:04:40 +0000 (UTC) Cc: Glenn Morris , emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 11 17:04:44 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 1IrFId-00032A-Su for ged-emacs-devel@m.gmane.org; Sun, 11 Nov 2007 17:04:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrFIS-0001XN-5H for ged-emacs-devel@m.gmane.org; Sun, 11 Nov 2007 11:04:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrFIO-0001V5-DA for emacs-devel@gnu.org; Sun, 11 Nov 2007 11:04:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrFIK-0001Qk-VL for emacs-devel@gnu.org; Sun, 11 Nov 2007 11:04:24 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrFIK-0001QT-Kt for emacs-devel@gnu.org; Sun, 11 Nov 2007 11:04:20 -0500 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IrFIJ-0008HQ-Qs for emacs-devel@gnu.org; Sun, 11 Nov 2007 11:04:20 -0500 Original-Received: (qmail 1996 invoked by uid 3782); 11 Nov 2007 16:04:15 -0000 Original-Received: from acm.muc.de (p57B1EB4D.dip.t-dialin.net [87.177.235.77]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sun, 11 Nov 2007 17:04:13 +0100 Original-Received: (qmail 1837 invoked by uid 1000); 11 Nov 2007 16:10:42 -0000 Content-Disposition: inline In-Reply-To: <200711111551.lABFpS6L011370@oogie-boogie.ics.uci.edu> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:82947 Archived-At: Hi, Dan! On Sun, Nov 11, 2007 at 07:51:24AM -0800, Dan Nicolaescu wrote: > Alan Mackenzie writes: > > On Fri, Nov 09, 2007 at 07:55:08PM -0500, Glenn Morris wrote: > > > Here's an attempt at a method to allow for suppressing of > > > byte-compiler warnings about undefined functions. > > > I haven't yet written the function to check that functions are > > > actually defined in the specified files, but I imagine it would be > > > straightforward. > > As a matter of interest, there has been this sort of functionality > > in cc-bytecomp.el (written by Martin Stjernholm) for some time. In > > particular, `cc-bytecomp-defun' and `cc-bytecomp-defvar', whose > > prime use is suppressing compiler warnings. > What is the advantage of (cc-bytecomp-defvar VARIABLE) over plain > (defvar VARIABLE)? You can have the variable "defined" solely for the duration of the byte-compilation. This is useful for `xemacs-foo' and `gnu-emacs-bar' if your file.el is portable. It's useful for core Emacs variables/functions defined in a file which isn't currently loaded. > > It might be sensible to reuse this. > Would that be possible without editing all elisp files in emacs? Yes, absolutely! But it'll need some files to be edited. ;-) -- Alan Mackenzie (Ittersbach, Germany).