|
From: | Ergus |
Subject: | Re: Select completions from the minibuffer |
Date: | Sun, 13 Mar 2022 19:52:15 +0100 |
On Sun, Mar 13, 2022 at 07:47:11PM +0200, Juri Linkov wrote:
>Isn't it very similar to the region? I don't think so... I think it is more similar to the mouse-face feature / text property.Why do you think so? The region is redrawn when the cursor moves, and the cursor moves as result of Emacs commands, so how is this very different from what you want? By contrast, the mouse highlight is triggered by mouse movements that are completely independent of Emacs commands, and the implementation, as part of the display engine, is therefore quite complicated. Whereas the region display is nowadays implemented completely in Lisp.Ok, then it will be similar to the code I already have in completions-highlight-mode. Essentially add/move an overlay on post command hook based on some conditions.You could just add your function to the default value of pre-redisplay-functions, e.g. (defvar pre-redisplay-functions (list #'redisplay--update-region-highlight #'redisplay--update-mouse-face) where the new function 'redisplay--update-mouse-face' will activate the mouse-face when the cursor moves over the mouse-face property (only when an additional user option will be enabled).
Sone, please check it... I will add the extra option in a moment.
[Prev in Thread] | Current Thread | [Next in Thread] |