From: Jim Porter <jporterbugs@gmail.com>
To: 52237@debbugs.gnu.org
Subject: bug#52237: 29.0.50; [PATCH] Doubled separators in context-menu-mode
Date: Thu, 2 Dec 2021 10:47:06 -0800 [thread overview]
Message-ID: <07494cfd-0608-acb9-2839-e7ecbef4610c@gmail.com> (raw)
In-Reply-To: <0bbe5580-8e05-4e18-5b91-04b41b6f19bc@gmail.com>
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?
next prev parent reply other threads:[~2021-12-02 18:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-02 6:06 bug#52237: 29.0.50; [PATCH] Doubled separators in context-menu-mode Jim Porter
2021-12-02 8:24 ` Lars Ingebrigtsen
2021-12-02 17:44 ` Juri Linkov
2021-12-03 4:46 ` bug#52237: 29.0.50; [PATCH 2] " Jim Porter
2021-12-03 16:10 ` Lars Ingebrigtsen
2021-12-05 9:32 ` Juri Linkov
2021-12-05 20:20 ` Lars Ingebrigtsen
2021-12-03 16:08 ` bug#52237: 29.0.50; [PATCH] " Lars Ingebrigtsen
2021-12-04 6:44 ` Jim Porter
2021-12-04 8:26 ` Eli Zaretskii
2021-12-02 17:31 ` bug#52237: [External] : " Drew Adams
2021-12-02 18:09 ` Jim Porter
2021-12-02 18:25 ` bug#52237: [External] : " Drew Adams
2021-12-02 18:47 ` Jim Porter [this message]
2021-12-04 19:50 ` Juri Linkov
2021-12-04 20:56 ` Jim Porter
2021-12-04 22:09 ` Jim Porter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07494cfd-0608-acb9-2839-e7ecbef4610c@gmail.com \
--to=jporterbugs@gmail.com \
--cc=52237@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.