This is a followup to bug#52237. I'll just quote my message describing the issue from there[1]: > I found another odd case, but I'm not 100% sure the best way to fix it: > > emacs -Q --eval '(context-menu-mode)' > C-h o identity RET > ;; Right-click somewhere in the Help buffer > > There's a doubled separator after "Next Topic". Looking at the code, this is because `help-mode-context-menu' inserts new items using `define-key', which has the effect of putting the new items *before* the (hidden) menu title. The resulting keymap ends up looking like this: > > (keymap > (Previous\ Topic ...) > (Next\ Topic ...) > (help-mode-separator "--") > #("Context Menu" 0 12 (hide t)) > (separator-undo "--") > ...) > > Since there's a hidden item (the keymap title) between the `help-mode-separator' and `separator-undo'[1], the de-duplication doesn't handle that. Attached is a patch to fix this based on the discussion in bug#52237. One slightly odd thing is that for context menu functions that put their items at the top, they place their separator *below* the items. Other functions place the separator *above* the items. It might be too late to fix this though, given that Emacs 28 is only open for fixing regressions, and changing it in 29 would be a (small) compatibility break. However, I can update the patch to put the separators in these functions at the top if people think that's best. [1] https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-12/msg00143.html