Juri Linkov writes: >>> A possible workaround would be to check the special property >>> 'first-completion'. But then when the logic uses text properties, >>> why not to use more text properties that indicate that a candidate >>> is deselected (and remove highlighting in this case) instead of >>> moving point somewhere outside of the candidate? >> >> Even if we work around this with text properties, I think it's nice for >> deselection to be usually determined by location of point. I think >> that's easier to understand for the user - they should be able to >> deselect or reselect something purely by moving point around, it >> shouldn't require text property manipulation. > > I agree that it's better to indicate deselection by moving point. > > After more testing I found a small problem: > > M-x calc TAB TAB > > When the selected candidate is > > calc-dispatch (C-x *) > > then point is moved before the suffix "(C-x *)", > and after editing it is selected on RET. Ah, good catch. Fixed (by using 'completion--string to detect whether point is on a completion rather 'mouse-face)