[implementations-list] Why can't I byte-compile (all of) Vimpulse?

Vegard Øye vegard_oye at hotmail.com
Wed Apr 28 21:50:55 CEST 2010


> Date: Wed, 28 Apr 2010 16:06:35 +0200
> From: stepnem at gmail.com
>
>> According to the Reference, section 16.6,
>>
>>     [Y]ou can tell the compiler that a variable is defined using
>>     `defvar' with no initial value.
>>
>> But it doesn't mention the need for using `eval-and-compile' in the
>> compiled file! Way confusing.)
>
> Yeah, it doesn't mention that because it is not the case AFAIK, see
> above.

You're right, it isn't. Phew! I can't tell you how relieved that makes
me. :)

On closer inspection, `defvar' statements in the compiled file are
indeed recognized by the compiler (even if they are part of macro
expansions), but they aren't evaluated. So if you have a macro which
depends on the /value/ of a same-file variable to produce its
expansion, you do need to use `eval-and-compile'. (Vimpulse doesn't
have this, but the test code I wrote did.)

Anyway, I moved all variable definitions to vimpulse-dependencies.el
in commit [c757a0e4ff], and that helped things immensely.

>> All the makefile would have to do is remove the last two lines of
>> every file (one `provide' statement and one blank line) before
>> concatenating them.
>
> You could e.g. just replace `cat' in the makefile with
>
> sed "/^(\(provide\|require\) 'vimpulse-/d"

Thanks for this! Added in commit [701ac452c9].

Vegard 		 	   		  
_________________________________________________________________
Nye Windows 7: PCen som passer for deg. Finn ut mer.
http://windows.microsoft.com/shop


More information about the implementations-list mailing list