Subject: bug#77224: [PATCH] New minor mode 'cursor-indicators-mode'

From: Eli Zaretskii <[email-masked]>
Date: Thu, 27 Mar 2025 19:46:34 +0200

> From: Elijah Gabe Pérez <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Thu, 27 Mar 2025 11:10:06 -0600
> 
>  But what if user prefer using a lambda instead a function? For example for a specific mode or action
>  from a
>  key binding package such as evil or meow
> 
>  Sorry, I don't understand: what lambda? Aren't all the modes you want
>  to catch normal minor modes with a hook?
> 
> Not only minor mode, also functions (function symbols or anonymous ones).
> for example if user wants to change cursor appearance if a text at
> current cursor position have an overlay or whatever, can do it
> defining a function in their config:
> 
> (defun my/cursor-change ()
>   (string-prefix-p " *" (buffer-name)))
> 
> (setopt cursor-indicators-conditions `((my/cursor-change hollow "yellow")))
> 
> or
> 
> (setopt cursor-indicators-conditions `((,(lambda () (string-prefix-p " *" (buffer-name)))
>                                         hollow "yellow")))

We have buffer-list-update-hook and window-configuration-change-hook,
which I think should cover these.