Subject: bug#56155: 29.0.50; Options menu, toggle menu items not updated

From: Po Lu <[email-masked]>
Date: Wed, 29 Jun 2022 16:53:24 +0800

Daniel Martín <[email-masked]> writes:

> There is [EmacsMenu menuWillOpen:], whose implementation is empty right
> now.

It's not present (as in, not actually called) on GNUstep, and you aren't
supposed to perform long-running menu updates within it on Cocoa.

Updating the menu bar in Emacs takes somewhere between 50 to 300 ms
(this can depend on the current major and minor modes and GC), which is
too long.

The right thing would be to intercept and save the NSEvent that opened
the menu bar and generate a MENU_BAR_ACTIVATE_EVENT.  But I cannot
figure out how.