bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52293: 29.0.50; [PATCH v4] Prevent further cases of duplicated separ


From: Juri Linkov
Subject: bug#52293: 29.0.50; [PATCH v4] Prevent further cases of duplicated separators in context menus
Date: Tue, 04 Jan 2022 10:19:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

close 52293 29.0.50
thanks

>>> I've attached an updated patch that lets context-menu-functions add items
>>> to the beginning of the keymap as they currently do, while still removing
>>> consecutive separators correctly. Since this logic is a bit tricky, it
>>> could probably use an automated test or two, but before I write some,
>>> I wanted to check that the strategy I'm using seems reasonable. It's
>>> probably easiest to explain the logic by just pointing to the patch;
>>> I added several comments describing the behavior so that reviewers (and
>>> future readers) should be able to make sense of it.
>> Thanks, I suppose it's for master, not for the release branch?
>
> Yeah, it's based on top of my previous patches that only landed on master,
> so the same applies for this one. I don't personally have an issue with if
> it merged to the release branch, but I also understand that we can't keep
> adding things to Emacs 28 forever.
>
> Attached is an updated patch with unit tests as well as a fix to the
> behavior from the previous version; in my last patch, it didn't delete the
> last separator in the menu if it was *before* the "Context Menu" overall
> prompt string. (This could happen if all the context-menu-functions *only*
> used `define-key'.)
>
> I've fixed that, though it did make the function a bit more complex. I've
> compensated for that with some more comments and what I hope are pretty
> thorough tests to make sure everything works as expected.

Thank you for the fix and for the unit tests.  Now pushed to master.
It seems this bug report can be closed now.  If you have more patches,
it can be reopened.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]