emacs-devel
[Top][All Lists]
Advanced

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

Re: Please check-in Belanger's Calc patches


From: Jay Belanger
Subject: Re: Please check-in Belanger's Calc patches
Date: Wed, 21 Jul 2004 09:59:14 -0500
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

Stefan <address@hidden> writes:

> [...]
>>      calc-invocation-macro, calc-show-banner): Define these as part of
>>           `calc-mode-var-list's initialization, instead of using defvar.
>
> Not defining those vars with defvar means that the byte-compiler doesn't
> get the info it wants.  It doesn't necessarily lead to wrong code, but it's
> very bad coding style and can prevent optimizations (which are admittedly
> not currently implemented).  It also leads to lots and lots of spurious
> warnings during byte-compilation.

Calc stores those variables in calc-mode-var-list so that functions
(which store and reset those variables) can easily access them.  
There are about four functions which do this.  If these variables are
set individually by defvar, then the store-reset functions would have
to be redone.  Restoring calc-mode-var-list is easier, but redoing the
functions is doable, no doubt.

Jay





reply via email to

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