bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#50067: Context menus


From: Juri Linkov
Subject: bug#50067: Context menus
Date: Thu, 25 Nov 2021 09:50:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

After clicking the right mouse button e.g. on the mode-line's minor-modes,
typing S-F10 on a misspelled word pops up the context menu over the mode-line
instead of the position over the misspelled word.  Because it tries to find
the last event that is a mouse event.  In case of keyboard-based 
'context-menu-open'
that let-binds 'inhibit-mouse-event-check' to t, this is not needed:

diff --git a/src/callint.c b/src/callint.c
index 44dae361c1..525a18683d 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -367,7 +367,7 @@ DEFUN ("call-interactively", Fcall_interactively, 
Scall_interactively, 1, 3, 0,
      event with parameters.  */
   ptrdiff_t next_event;
   for (next_event = 0; next_event < key_count; next_event++)
-    if (EVENT_HAS_PARAMETERS (AREF (keys, next_event)))
+    if (inhibit_mouse_event_check || EVENT_HAS_PARAMETERS (AREF (keys, 
next_event)))
       break;
 
   /* Handle special starting chars `*' and `@'.  Also `-'.  */
@@ -618,6 +618,7 @@ DEFUN ("call-interactively", Fcall_interactively, 
Scall_interactively, 1, 3, 0,
          do
            next_event++;
          while (next_event < key_count
+                && ! inhibit_mouse_event_check
                 && ! EVENT_HAS_PARAMETERS (AREF (keys, next_event)));
 
          break;

reply via email to

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