emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: suppressing byte-compiler warnings about undefined functions


From: Dan Nicolaescu
Subject: Re: suppressing byte-compiler warnings about undefined functions
Date: Sun, 11 Nov 2007 10:32:21 -0800

Dan Nicolaescu <address@hidden> writes:

  > Alan Mackenzie <address@hidden> writes:
  > 
  >   > Hi, Dan!
  >   > 
  >   > On Sun, Nov 11, 2007 at 07:51:24AM -0800, Dan Nicolaescu wrote:
  >   > > Alan Mackenzie <address@hidden> 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...

In fact most cc-bytecomp-defvars are not useful. I removed all of them
and recompiled. Only filladapt-*, c-syntactic-* and
c-preprocessor-face-name got warnings.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]