On Tue, Apr 12 2011, Stefan Monnier wrote:

> Hmm... good point, doing it in completion-choices is not reliable, tho
> using as completion table something like:
>
> (lambda (string pred action)
>   (let ((res (complete-with-action action completion-choices string pred)))
>     (if (and (eq action nil)
>              (assq (if (eq res t) string res) <expansion-alist>))
>         (cdr (assq (if (eq res t) string res) <expansion-alist>))
>       res)))
>
> should work OK for prefix completion, but that means using the expansion
> "by hand" rather than via expand-abbrev, which may not be an option.

Yeah. That does not looks like a simple/good option.
As it stands, I guess the bbdb solution to return a function doing the
replacement rather than trying to return a list and conform with the
(current) way of doing completion is really simpler, unfortunately. :(

-- 
Julien Danjou
❱ http://julien.danjou.info

Attachment: pgp0LZN7uU1rU.pgp
Description: PGP signature

Reply via email to