From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: New Context Menu Date: Mon, 23 Aug 2021 14:36:40 +0300 Message-ID: <83sfz0wfxz.fsf@gnu.org> References: <20210818120834.i3orh535tb2enpos.ref@Ergus> <20210818120834.i3orh535tb2enpos@Ergus> <87r1epzznt.fsf@mail.linkov.net> <83zgtd2762.fsf@gnu.org> <87fsv4io41.fsf@mail.linkov.net> <838s0w1hiz.fsf@gnu.org> <871r6odq3s.fsf@mail.linkov.net> <83y28wyozn.fsf@gnu.org> <87a6l8it83.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28687"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 23 13:37:44 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mI8Gt-0007F8-8V for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Aug 2021 13:37:43 +0200 Original-Received: from localhost ([::1]:33170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mI8Gr-0002KD-9H for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Aug 2021 07:37:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mI8G4-0001Zz-4f for emacs-devel@gnu.org; Mon, 23 Aug 2021 07:36:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45786) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mI8G2-0003f0-7W; Mon, 23 Aug 2021 07:36:50 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4029 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mI8G1-0001jZ-QD; Mon, 23 Aug 2021 07:36:50 -0400 In-Reply-To: <87a6l8it83.fsf@mail.linkov.net> (message from Juri Linkov on Mon, 23 Aug 2021 10:33:32 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272869 Archived-At: > From: Juri Linkov > 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?