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

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

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


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

The `args' arguments to lazy-completion-table are only evaluated when we
actually compute the completion table.  So they basically can only use
global variables, which is very limiting.

It's pretty clear to me that the intention was to evaluate those args
immediately, so that they are evaluated in the local environment.

As it currently stands

   (lazy-completion-table var fun arg1 arg2)

behaves just like

   (lazy-completion-table var (lambda () (fun arg1 arg2)))

so it's not very useful as it stands.  I don't have a patch handy.
The cleanest way to solve the problem uses lexical-let, but I'm reluctant to
use a CL macro in subr.el.


        Stefan




reply via email to

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