[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Completing with anything
From: |
Stefan Monnier |
Subject: |
Re: [O] Completing with anything |
Date: |
Tue, 12 Apr 2011 00:42:43 -0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> Because this one return (list start end completion-choies), and does not
> do anything else. I can't do it myself using the current completion
> mechanism, IIUC.
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.
Stefan