[Top][All Lists]
[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
Re: byte-optimize-set causes spurious byte compiler warnings, Richard Stallman, 2003/04/06