[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13250: 24.3.50; Add a way to show pre-highlighted candidates in comp
From: |
Stefan Monnier |
Subject: |
bug#13250: 24.3.50; Add a way to show pre-highlighted candidates in completions buffer |
Date: |
Sat, 29 Dec 2012 00:29:30 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> It would have to be a different function and metadata property, no?
Could be.
> I don't think we can change annotation-function to return the candidate plus
> annotation, for example.
Currently it can only return a string (which is combined with the
completion into a cons cell), but we could let it return the cons cell
directly. That wouldn't necessarily help with "annotations before" (and
it wouldn't make sure that the annotations don't actually change
the completions).
> So, AFAICT, the proper solution would be to walk the part of the string,
> look at every piece in it that has a different value of 'face, then where
> the value is a symbol, wrap it into a list, and then add the new face to the
> end of the lists. And repeat for the "first difference".
Yes. Lars wanted to add a function that does just that, but you can use
font-lock-prepend-text-property in the mean time.
Stefan