[Top][All Lists]

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

Re: Bugs in newly added completion capabilities.

From: Kim F. Storm
Subject: Re: Bugs in newly added completion capabilities.
Date: Fri, 01 Jul 2005 10:14:08 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Luc Teirlinck <address@hidden> writes:

> since the following change made relatively recently (I thought we were
> in a feature freeze, but anyway):
> 2005-02-22  Kim F. Storm  <address@hidden>
>           * minibuf.c (Ftry_completion, Fall_completions): Allow
>               both string and symbol keys in alists and hash tables.
> Again I am not arguing for or against the desirability of this change,
> I am trying to deal with its consequences.

I changed them to support the following change:

2005-02-22  Kim F. Storm  <address@hidden>

        * progmodes/hideif.el (hide-ifdef-use-define-alist):
        Use completing-read.  Suggested by Juan-Leon Lahoz Garcia.

> There are two problems: the _nearly_ everywhere is very inconsistent
> and the exceptions at first seem totally arbitrary, so it should be
> clearly documented what the exceptions are and what the motivation for
> the exceptions is.

I don't think there were any explicit motivation (rather oversight on
my part) -- better fix the code to DTRT.  Please do.

>    I don't like the idea of adding "" at the beginning of a completion table.
>    Here I have a good reason, which is that it changes the behavior:
>       (try-completion "" '("aaa" "aab" "aac"))  => "aa"
>       (try-completion "" '("" "aaa" "aab" "aac"))  => ""
> Of course, the person consing "" to the front of the completion table
> will have to write his code to expect the second answer.

Perhaps a check to see if first elt is lambda and second elt is a list
would be a reasonable way to recognize a lambda form.

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

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