[Top][All Lists]

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

Re: address@hidden: Speed of all-completions]

From: Luc Teirlinck
Subject: Re: address@hidden: Speed of all-completions]
Date: Tue, 15 Jun 2004 10:42:36 -0500 (CDT)

David Kastrup wrote:

   To illustrate what I mean, here is a patch against the most recent
   version.  Note that I have to undo the binding before calling a
   user-defined predicate function (which might rely on the original
   binding).  The last of your three changes, not running in a loop, was
   not improvable, however.

I believe it is a programmer defined predicate function.  The obvious
alternative to your patch would be to have case-fold-search bound to
the value of completion-ignore-case around the entire while loops.
The difference with the current situation would be that the binding
would be in effect during the call to the predicate function.  I
believe that the result of the predicate function should not depend on
a value which the user customized for a completely unrelated reason,
interactive convenience.  So the binding probably _should_ be in effect
during the call to PREDICATE.

If we decide to bind around the entire while loop we should document
the fact that the binding is in effect during the call to predicate in
the Elisp manual.  In that case, the
`if (CONSP (Vcompletion_regexp_list))' should be removed, and for
consistency, the scope should also be extended in Ftest_completion.

Is one single prolonged binding using specbind expensive or was the
efficiency problem completely caused by the fact that it was used
countless times in a loop?



reply via email to

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