Hi, Eli Zaretskii writes: >> Date: Sun, 12 May 2024 10:29:24 +0200 >> Cc: me@eshelyaron.com, 70622@debbugs.gnu.org >> From: martin rudalics >> >> > The ANYTHING ELSE clause is simply defensive programming, something we >> > do in many other places. It can easily hide mistakes, and I see no >> > reason not to help users find those mistakes. >> >> I'm not a fan of strong typing but I agree with you. The problem I see >> is that we don't care about catching mistakes when setting the variable >> or the corresponding frame parameter. If we want to help users finding >> mistakes, we should care everywhere in a consistent fashion. >> >> > But if you are still unconvinced, I won't argue, although I still >> > don't understand your and Eshel's objections. >> >> I only stated my personal view and will leave it to Eshel and you how >> serve users best. > > Thanks. Let's see what Eshel takes from this. I think that given there are no strictly invalid cursor-type values, designating some (most) values as invalid for set-window-cursor-type reduces consistency for little practical gain. OTOH, I don't think there's any real harm to it either, so I added such a check in the update patch below. I've also extended the documentation of set-window-cursor-type to note that this setting persists when you change the buffer of the window, as Martin suggested. I've added a FIXME comment about extending window-cursor-type with an optional argument that asks for the effective cursor type, but I did not implement it at this point. I looked into it, but the implementation is quite involved, it basically requires duplicating many of the careful considerations of get_window_cursor_type, or refactoring it for reuse. Since we do provide all the needed information for computing the effective cursor in Lisp, and there's no concrete use case for doing that ATM, I think we can leave it at for now. Here's the updated patch: