Subject: Re: bug#17954: 24.4.50; [patch] `menu-bar-make-toggle' should allow for keywords

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 19 Sep 2020 18:24:37 +0200

Drew Adams <[email-masked]> writes:

> `menu-bar-make-toggle' handles no keywords.  It takes the value of
> :help as an explicit argument (without keyword), but it does not pass
> along :keys, :active, :enable, etc. to `menu-item'.  It should.
>
> It cannot accept keywords in the normal way because it defines BODY as
> an &rest parameter.  This mistake should be corrected, making for an
> incompatible change unfortunately, in order to allow a KEYWORDS &rest
> parameter.
>
> BODY is seldom used.  In the Emacs Lisp sources, there are only these
> two occurrences of `menu-bar-make-toggle' that use BODY:
> `toggle-save-place-globally' and `toggle-uniquify-buffer-names'.  They
> would just need to wrap the current BODY code in an explicit `progn'.

I've now applied your patch, but renamed the resulting macro to
menu-bar-make-toggle-command, while the former name is now an obsolete
wrapper macro.  I've also adjusted all in-tree callers.

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