emacs-devel
[Top][All Lists]
Advanced

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

Re: New Context Menu


From: Eli Zaretskii
Subject: Re: New Context Menu
Date: Mon, 23 Aug 2021 14:36:40 +0300

> From: Juri Linkov <juri@linkov.net>
> Cc: spacibba@aol.com,  emacs-devel@gnu.org
> Date: Mon, 23 Aug 2021 10:33:32 +0300
> 
> >> There are too many commands that have the "e" interactive spec.
> >> It would be much simpler not to signal an error for them, but produce
> >> a fake event where the clicked position is set to the position of point.
> >
> > Feel free to work on that (I guess that needs changes on the C
> > level?).
> 
> Actually, I found out that no work is needed.  When this restriction
> is removed from `call-interactively':
> 
>         if (next_event >= key_count)
>           error ("%s must be bound to an event with parameters",
>                  (SYMBOLP (function)
>                   ? SSDATA (SYMBOL_NAME (function))
>                   : "command"));
> 
> then everything works fine thanks to the old decision to accept
> non-mouse events in event-start, event-end, event-click-count:
> 
>   (defun event-start (event)
>     (if (consp event) (nth 1 event)
>       (or (posn-at-point)
>           (list (selected-window) (point) '(0 . 0) 0)))

The question is: do we want to remove this unconditionally for all the
commands that say (interactive "e") ?  That sounds a
backward-incompatible change to me.

Should we perhaps condition that by some variable, which menu commands
could bind when they want?



reply via email to

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