Author: Nikolaj SchumacherNikolaj Schumacher Date: Sep 12, 2008 10:58
Nordlöw gmail.com> wrote:
> I guess I need to give it an explicit completion function (as second
> argument) to achieve lookups of list of vectors where for example
> "accumulate" is used as key and the return value is the whole list
> element (vector).
The easiest way would be just to duplicate the first element in a cons.
(a . [a b c d])
Or use a hash map.
Certainly, you could also write your own completion functions, but it
will be significantly slower, because it's written in lisp. (If speed
that's of any concern...)
> Why doesn't completing-read() already work on list of vectors where
> first vector element is a string aswell?
Unfortunately, there are few functions capable of working with vectors.
Consequently, They are rarely used. (Consequently, there are few
functions capable of working with them.)
regards,
Nikolaj Schumacher
|