On 12/2/2021 9:44 AM, Juri Linkov wrote: >>> I've only tested this on Emacs 29 so far, but it may occur on Emacs 28 >>> as well. >> >> Thanks; applied to Emacs 29. > > Why not to Emacs 28? I got a chance to check this under Emacs 28, and the bug exists there too, so it'd be nice to backport. >>> Also, I noticed that separators can appear at the beginning >>> and/or end of the context menu. Should they be removed too? >> >> Hm... I think that might make sense, but I'm not sure. Anybody got an >> opinion? > > Removing leading/trailing separators would be nice too. Ok, here's a patch to do it. There might be a better way to do this, but it should work reliably. Note: this patch doesn't fix the duplicated separators in the help-mode context menu. I haven't had time to look into the right way to fix that yet (there may be other mode-specific context menu functions that have this bug too).