Subject: bug#28931: bug#28930: 24.5; cua-mode does not replace keyboard shortcuts in Edit menu

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 31 Jul 2021 18:19:49 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> Let's see...  this is from this stuff:
>
>     (bindings--define-key menu [copy]
>       ;; ns-win.el said: Substitute a Copy function that works better
>       ;; under X (for GNUstep).
>       `(menu-item "Copy" ,(if (featurep 'ns)
>                               'ns-copy-including-secondary
>                             'kill-ring-save)
>                   :enable mark-active
>                   :help "Copy text in region between mark and current position"
>                   :keys ,(if (featurep 'ns)
>                              "\\[ns-copy-including-secondary]"
>                            "\\[kill-ring-save]")))
>
> (etc)
>
> I guess we could add a case for cua-mode in the :keys here, too?

No, we can't -- that has to be computed dynamically, and :keys doesn't
allow that.  I think?

I tried to use :filter, but it couldn't figure out how to use that to
return a dynamically generated menu item -- is that even possible?

Perhaps we should just allow :keys to be a lambda?  Any opinions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no