* src/callint.c (Fcall_interactively): Fix inhibit_mouse_event_check.
Don't search for the next mouse event with parameters when inhibit-mouse-event-check is non-nil (bug#50067).
This commit is contained in:
parent
70c229b1fc
commit
9aa8fd6e62
1 changed files with 17 additions and 10 deletions
|
@ -364,9 +364,12 @@ invoke it (via an `interactive' spec that contains, for instance, an
|
||||||
|
|
||||||
/* The index of the next element of this_command_keys to examine for
|
/* The index of the next element of this_command_keys to examine for
|
||||||
the 'e' interactive code. Initialize it to point to the first
|
the 'e' interactive code. Initialize it to point to the first
|
||||||
event with parameters. */
|
event with parameters. When `inhibit_mouse_event_check' is non-nil,
|
||||||
ptrdiff_t next_event;
|
the command can accept an event without parameters,
|
||||||
for (next_event = 0; next_event < key_count; next_event++)
|
so don't search for the event with parameters in this case. */
|
||||||
|
ptrdiff_t next_event = 0;
|
||||||
|
if (!inhibit_mouse_event_check)
|
||||||
|
for (; next_event < key_count; next_event++)
|
||||||
if (EVENT_HAS_PARAMETERS (AREF (keys, next_event)))
|
if (EVENT_HAS_PARAMETERS (AREF (keys, next_event)))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -606,7 +609,7 @@ invoke it (via an `interactive' spec that contains, for instance, an
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'e': /* The invoking event. */
|
case 'e': /* The invoking event. */
|
||||||
if (!inhibit_mouse_event_check && next_event >= key_count)
|
if (next_event >= key_count)
|
||||||
error ("%s must be bound to an event with parameters",
|
error ("%s must be bound to an event with parameters",
|
||||||
(SYMBOLP (function)
|
(SYMBOLP (function)
|
||||||
? SSDATA (SYMBOL_NAME (function))
|
? SSDATA (SYMBOL_NAME (function))
|
||||||
|
@ -614,6 +617,10 @@ invoke it (via an `interactive' spec that contains, for instance, an
|
||||||
args[i] = AREF (keys, next_event);
|
args[i] = AREF (keys, next_event);
|
||||||
varies[i] = -1;
|
varies[i] = -1;
|
||||||
|
|
||||||
|
/* `inhibit_mouse_event_check' allows non-parameterized events. */
|
||||||
|
if (inhibit_mouse_event_check)
|
||||||
|
next_event++;
|
||||||
|
else
|
||||||
/* Find the next parameterized event. */
|
/* Find the next parameterized event. */
|
||||||
do
|
do
|
||||||
next_event++;
|
next_event++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue