GNU bug report logs -
#52237
29.0.50; [PATCH] Doubled separators in context-menu-mode
Previous Next
Reported by: Jim Porter <jporterbugs <at> gmail.com>
Date: Thu, 2 Dec 2021 06:07:01 UTC
Severity: normal
Tags: moreinfo, patch
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 12/1/2021 10:06 PM, Jim Porter wrote:
> Sometimes, menu separators are doubled up in context-menu-mode.
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. Is there a standard/common way of defining a key
such that it goes immediately *after* the keymap's title? I guess we
could add `context-menu-top-separator' as an anchor (by analogy to
`context-menu-middle-separator'), but maybe there's a simpler way...
[1] As an aside, is there a standard naming convention to use here?
Should "separator" go at the beginning of the name or the end?
This bug report was last modified 3 years and 261 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.