emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: lazy-completion-table's args are evaluated too late


From: Stefan Monnier
Subject: Re: lazy-completion-table's args are evaluated too late
Date: Wed, 21 Dec 2005 14:45:36 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> Looks like it works indeed, although it breaks my code because my code
>> relies on lexical-let which doesn't work correctly when the lambdas are
>> built at run time as is the case in your code.

>> So maybe I'll be better off with the current code.  Hmm....

>> I can install my fix, or I can leave it out, but I can't do both at once.
> Too bad you're only a saint, eh?

>> The function as changed this way seems to be more capable and better,
>> which seems to suggest I should install my fix.
> Agreed.

>> Can you fix your code to work with the function's new capability?
> That's what I'm about to try,

I can indeed fix my code, but it then becomes really ugly, much uglier than
what I'm currently using.

Also looking at the existing uses of lazy-completion-table, I see that
bibtex.el relies on the current behavior.

Maybe it's better to leave the code as is.
If I want `arg' to be evaluated early, I can easily replace

     (lazy-completion-table var fun arg)
with
     (lazy-completion-table var `(lambda () (fun ',arg)))

[ which is what I'm currently using. ]


        Stefan




reply via email to

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