emacs-devel
[Top][All Lists]
Advanced

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

Declaring variables


From: Richard Stallman
Subject: Declaring variables
Date: Fri, 28 Dec 2001 12:11:47 -0700 (MST)

Many byte compiler warnings are for reference to a global
variable that has no visible definition.  It would be nice
to get rid of them.  The way to do that with existing facilities
is to write

  (defvar variable)

in the file.  But that has disadvantages, because some facilities will
treat it as a real definition of the variable.  It would be good to
have a clean solution that would have no disadvantages.  I recall
there was a discussion of this about a year ago, but I don't recall
what conclusion (if any) we reached.

I can see two approaches: define another construct for declaring a
variable and not defining it, or change the facilities that now get
confused by this so that they won't get confused any more.

Does anyone recall precisely which facilities can get confused?  I
suspect that etags is one of them: is it possible to fix etags to
ignore defvar with just one arg?  Is there a drawback with doing so?

Does XEmacs have a solution to this that we might want to be
compatible with?



reply via email to

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