On 2025-01-06 05:30, Eli Zaretskii wrote: >> Date: Sun, 05 Jan 2025 16:05:59 -0800 >> From: Jared Finder >> Cc: gerd.moellmann@gmail.com, emacs-devel@gnu.org, rudalics@gmx.at >> >> Style comments addressed, thank you! Someday, I will internalize >> Emacs' >> unique C style conventions. Probably once I only code for Emacs and >> not >> other projects. :) > > FTR, they are not Emacs conventions, they are GNU conventions. Ah, good point. This gave me hope I could just run GNU indent on the files I edited, but sadly that doesn't work. I got a lot of unrelated changes, some of which seem to be fine either way, and some of which are conflicts with the DEFUN() doc: parameter. This is sad, it would be really really nice if GNU style conventions could be automatically applied. Then such conventions could be automatically checked or fixed when commits are made. Does anyone here have a way to automatically check or fix the Emacs style convention? It would be soooo helpful for occasional committers like myself. >> > Does this mean child frames on xterm will have the selected-frame set >> > to a child frame, and thus do not need this trick with >> > last_mouse_frame? Or what other difference between xterm and the >> > Linux console hides behind this "fallback"? >> >> This is just keeping the behavior that already exists today. I was >> surprised by the current behavior: that term_mouse_position which only >> works for a GPM enabled mouse gets called even when GPM could not be >> used. It could make sense to change this behavior however it would be >> a >> bigger change as gpm-mouse-mode is enabled by default even for non-GPM >> supporting terminals. I suspect that GPM support is equivalent to >> TERM=linux, but I may be wrong. >> >> This works when xterm-mouse-mode is enabled because >> mouse_position_hook >> (set to term_mouse_position) is called first, followed by >> mouse-position-function (set to xterm-mouse-position-function). On >> ttys >> with xterm-mouse-mode enabled the return value from >> term_mouse_position >> is ignored. See existing definitions in Fmouse_pixel_position and >> mouse_position in frame.c. > > Maybe term_mouse_position should return immediately if GPM is not > enabled? Sure, that was easy enough. Other comments addressed as well. New patch attached. -- MJF