From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: suppressing byte-compiler warnings about undefined functions Date: Sun, 11 Nov 2007 08:18:39 -0800 Message-ID: <200711111618.lABGIdfU011865@oogie-boogie.ics.uci.edu> References: <20071111084614.GB1038@muc.de> <200711111551.lABFpS6L011370@oogie-boogie.ics.uci.edu> <20071111161042.GA1653@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194797989 16574 80.91.229.12 (11 Nov 2007 16:19:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2007 16:19:49 +0000 (UTC) Cc: Glenn Morris , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 11 17:19:54 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 1IrFXJ-0007TP-HD for ged-emacs-devel@m.gmane.org; Sun, 11 Nov 2007 17:19:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrFX7-0002i6-GM for ged-emacs-devel@m.gmane.org; Sun, 11 Nov 2007 11:19:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrFX3-0002h1-L0 for emacs-devel@gnu.org; Sun, 11 Nov 2007 11:19:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrFX2-0002g4-9H for emacs-devel@gnu.org; Sun, 11 Nov 2007 11:19:33 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrFX2-0002g0-0v for emacs-devel@gnu.org; Sun, 11 Nov 2007 11:19:32 -0500 Original-Received: from oogie-boogie.ics.uci.edu ([128.195.1.41]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IrFWv-0005tV-9f; Sun, 11 Nov 2007 11:19:25 -0500 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by oogie-boogie.ics.uci.edu (8.13.6/8.13.6) with ESMTP id lABGIdfU011865; Sun, 11 Nov 2007 08:18:39 -0800 (PST) In-Reply-To: <20071111161042.GA1653@muc.de> (Alan Mackenzie's message of "Sun\, 11 Nov 2007 16\:10\:42 +0000") Original-Lines: 40 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.84, required 5, autolearn=disabled, ALL_TRUSTED -1.44, J_CHICKENPOX_42 0.60) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 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:82951 Archived-At: Alan Mackenzie writes: > 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. But that is not different from plain defvar, it just seems to add a layer of obfuscation... > > > 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. ;-) :-) Joke aside, please see the long discussion that preceded Glenn's design, the thread was called "byte compiler warnings when bootstrapping".