[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New Context Menu
From: |
Juri Linkov |
Subject: |
Re: New Context Menu |
Date: |
Mon, 23 Aug 2021 19:04:39 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> 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?
So here is a new variable:
diff --git a/src/callint.c b/src/callint.c
index 6f8a7f13f6..381a3443d2 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -606,7 +606,7 @@ DEFUN ("call-interactively", Fcall_interactively,
Scall_interactively, 1, 3, 0,
break;
case 'e': /* The invoking event. */
- if (next_event >= key_count)
+ if (!inhibit_event_check && next_event >= key_count)
error ("%s must be bound to an event with parameters",
(SYMBOLP (function)
? SSDATA (SYMBOL_NAME (function))
@@ -900,6 +900,13 @@ syms_of_callint (void)
a way to turn themselves off when a mouse command switches windows. */);
Vmouse_leave_buffer_hook = Qnil;
+ DEFVAR_BOOL ("inhibit-event-check", inhibit_event_check,
+ doc: /* Non-nil means the interactive spec "e" doesn't check for events.
+In this case `(interactive "e")' doesn't signal an error when no event
+is produced. Then `event-start', `event-end', `event-click-count'
+can create a new event. */);
+ inhibit_event_check = false;
+
defsubr (&Sinteractive);
defsubr (&Scall_interactively);
defsubr (&Sfuncall_interactively);
- Re: New Context Menu, (continued)
- Re: New Context Menu, Juri Linkov, 2021/08/20
- Re: New Context Menu, Eli Zaretskii, 2021/08/20
- Re: New Context Menu, Juri Linkov, 2021/08/20
- Re: New Context Menu, Eli Zaretskii, 2021/08/20
- Re: New Context Menu, Juri Linkov, 2021/08/23
- Re: New Context Menu, Eli Zaretskii, 2021/08/23
- Re: New Context Menu,
Juri Linkov <=
- Re: New Context Menu, Eli Zaretskii, 2021/08/23
- Re: New Context Menu, Juri Linkov, 2021/08/23
- Re: New Context Menu, Ergus, 2021/08/23
- Re: New Context Menu, Juri Linkov, 2021/08/24
- Re: New Context Menu, Ergus, 2021/08/24
- Re: New Context Menu, Yuri Khan, 2021/08/24
- Re: New Context Menu, Ergus, 2021/08/24
- Re: New Context Menu, Yuri Khan, 2021/08/24
- Re: New Context Menu, Ergus, 2021/08/24
Re: New Context Menu, Ergus, 2021/08/19