[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Select completions from the minibuffer

From: Juri Linkov
Subject: Re: Select completions from the minibuffer
Date: Sun, 13 Mar 2022 19:47:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>>> >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

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).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]