[net.emacs] Emacs #264, progn and errors : Fix

thomas%UTAH-GR@utah-cs@sri-unix.UUCP (08/28/83)

From:  Spencer W. Thomas  <thomas%UTAH-GR@utah-cs>

Well, wouldn't you know, post a fix, and immediately you find an error
in it.  This probably won't affect most of you, it should only happen
if you are using the old HalfBaked mode.  If an error occurs during
variable declaration (I.e., by typing ^G in HalfBaked mode), so that
not all the variables are declared, then either (1) a variable will be
unbound that shouldn't have, or (2) emacs will core dump trying to free
a 0 pointer.  The fix is to count the number of declarations that
actually take place, and only unbind that many variables.  I added an
int "ndecl", and made the following changes:
	1. After the variable declaration loop, add
		ndecl = EI.Nis - 1;
	2. Change the unbinding for loop to
		for (i = 1; (v = VnameArg (i)) && i <= ndecl; i++) {

=Spencer