emacs-devel
[Top][All Lists]
Advanced

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

Re: master 128ed5c9f17: Add one more mouse-set-point call to functions x


From: Juri Linkov
Subject: Re: master 128ed5c9f17: Add one more mouse-set-point call to functions xref-find-*-at-mouse
Date: Thu, 31 Aug 2023 09:37:12 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> My point is this: xref-find-definitions itself, not its callers, should
> take EVENT, then call (goto-char (posn-point (event-start event)))
> within.

Alas, most of the commands don't support EVENT.  It's a real problem
for menu items at the bottom of the context menu where submenus are
constructed from major/minor modes.  For example, in emacs-lisp-mode
clicking on "Emacs-Lisp -> Indent Line" operates on the line where point
is located, not on the clicked line.  And the rest of commands do the same.

Maybe while constructing the context menu, some commands should be wrapped
with a new function that will use '(save-excursion (mouse-set-point event))'.
The problem is that this is necessary only for some of them, not all:
only for the commands that rely on the position of the mouse click,
not for the commands that operate on the whole buffer.  For example,
in emacs-lisp-mode only for the menu item "Evaluate Last S-expression",
but not for "Evaluate Buffer".



reply via email to

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