From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Jeremy Bryant <jb@jeremybryant.net>,
71761@debbugs.gnu.org, tpeplt@gmail.com
Subject: bug#71761: 29.3; Emacs-Lisp menu display is incorrect during Edebug
Date: Sun, 30 Jun 2024 00:12:46 -0400 [thread overview]
Message-ID: <jwvy16nqdne.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86cyo0j9ff.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 29 Jun 2024 14:05:40 +0300")
> AFAICT, the duplicate menu is the consequence of the fact that
> edebug-mode has its keymap inherit from emacs-lisp-mode:
>
> (defvar-keymap edebug-mode-map
> :parent emacs-lisp-mode-map
>
> So when Edebug is activated, it wants to display yet another "Emacs
> Lisp" menu on the menu bar.
Yup, it's a longstanding problem. E.g. we don't really have a way for
major/minor mode keymaps to *add* elements to an existing menu.
> Stefan, do you see a way to avoid that?
I think `keymap-canonicalize` is the place where we could try to handle
that, but IIRC the menu code doesn't really use it, and for "good"
reasons: we can't really take all the active keymaps and merge them into
a single canonicalized keymap because it's hard for such a merge to be
both semantically correct at the same time as providing elements in the
expected visual order (e.g. the ordering of top-level menus would
naturally be in the order of priority of the keymaps from where they
come, which would put minor mode menus at the top-left, followed by
major mode menus followed by global menus, whereas we want the exact
opposite ordering visually).
Stefan
prev parent reply other threads:[~2024-06-30 4:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 20:32 bug#71761: 29.3; Emacs-Lisp menu display is incorrect during Edebug tpeplt
2024-06-28 18:10 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-29 11:05 ` Eli Zaretskii
2024-06-29 12:20 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-29 12:47 ` Eli Zaretskii
2024-06-29 22:04 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-30 4:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvy16nqdne.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=71761@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jb@jeremybryant.net \
--cc=monnier@iro.umontreal.ca \
--cc=tpeplt@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).