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

Štěpán Němec stepnem at gmail.com
Wed Apr 28 23:01:31 CEST 2010


On Wed, Apr 28, 2010 at 07:50:55PM +0000, Vegard Øye wrote:
> >> 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.

Great.
 
> >> 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].

Yeah, sed & AWK are fun, although unfortunately I rarely use them and am
far from proficiency in either one. The renowned one-liner files might
be of interest:
http://www.osnews.com/story/21004/Awk_and_Sed_One-Liners_Explained


BTW, good luck with the "trailing newlines" removal -- are you now going
to unset `require-final-newline' every time you edit the files? ;-)

Štěpán



More information about the implementations-list mailing list