Re: sawfish 1.6.3 can't compile sawfish.wm.util.prompt

Teika Kazura <teika lavabit com> writes:

> How about adding 
>   ;; This is to compile correctly
>   (require 'prompt) 
> inside of eval-when-compile? An entry 'prompt' in the 'open' clause
> may be deleted by someone in the future, "Hey, it's redundant."
> Double defvar is insane.

I don't know, what actually happens on a second open?  Does it mean that
the entire file gets processed twice?  That would be not just double
defvar, but double everything.  But I don't really know if that's what's
happening when a file is opened from itself: it must get processed in
some way (since it fixes the bug), but how much and in what way?
Personally, I'm more comfortable with double defvars because that way we
know exactly what's being doubled.  But I'm perfectly willing to be
corrected if someone knows what happens when the file is opened from

> It's also okay to delete eval-when-compile. What's wrong with compiler
> warnings after all? If you don't like it, it's possible to add
> (eval-when-compile
>   (format standard-error 
>           "Ignore such-and-such warnings below. They're know\n"))

I have no real opinion here.  But I can see where it would make it
easier to find compilation bugs when there are no extra warnings to
confuse users.

> It seems that Jeremy's patch on 19 sep 2009, which can be tracked from
> the wiki, gets rid of these defvar's, but I haven't checked it.
> Jeremy, what do you think of it? (It's not urgent. Correct compilation
> is what's needed now.)

I have a local git branch[1] that changes a lot of defuns to defines,
including a lot of the defvars and all the defuns in prompt.jl.  This
eliminates the compilation warnings without the eval-when-compile, but
it also changes the way prompt is called.  Is this what you mean?

[1] There are a few defun instances left that may or may not be
    necessary; I haven't yet taken the time to understand how they're
    used well enough to tell.  They're in:

     - sawfish.wm.ext.window-history
     - sawfish.wm.gaol
     - sawfish.wm.state.configure

Jeremy Hankins <nowan nowan org>

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