emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: byte-optimize-set causes spurious byte compiler warnings


From: Stefan Monnier
Subject: Re: byte-optimize-set causes spurious byte compiler warnings
Date: Thu, 03 Apr 2003 13:32:28 -0500

> >>   (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map)
> >
> > The code needs a (defvar tool-bar-map) to declare that
> > tool-bar-map is an externally defined variable.
> 
> I know that defvar silences the warning.  But what's the point?  It
> serves no other useful purpose than pacifying the byte compiler.

If the code correctly puts defvars where needed, then the compiler
can use lexical scoping for non-defvarred variables, which can
lead to significant optimizations.


        Stefan





reply via email to

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