Subject: Re: bug#55301: 27.2; RFE: Auto-create defcustom for declared minor mode keymap

From: Phil Hudson <[email-masked]>
Date: Tue, 17 May 2022 17:03:07 +0100

So after a week, can I get a clear yes or no on this? Either is fine.

On Mon, 9 May 2022 at 16:04, Phil Hudson <[email-masked]> wrote:
>
> On Mon, 9 May 2022 at 14:39, Robert Pluim <[email-masked]> wrote:
> >
> > >>>>> On Mon, 9 May 2022 11:02:20 +0100, Phil Hudson <[email-masked]> said:
> >
> >     Phil> Isn't that exactly the right place for declarative personal preferences?
> >
> > Yes, but if a keymap were a defcustom, then the whole keymap would be
> > in your .emacs, and you would not receive any updates if the keymap
> > definition changed, since that affects the *default* defcustom value.
>
> True that, and I had not thought of it, but now that I have, I still
> don't see it as necessarily confounding. Doesn't the same objection
> (if it is one) apply to *every* defcustom? Is that not the risk that
> the user takes when they change any custom option, and the risk that
> every dev takes when they introduce a defcustom?
>
> > Now if you wanted to define a defcustom type for changing bindings in an
> > existing keymap, thatʼs a different proposition (and we already have
> > define-key, so Iʼm not so sure of the utility).
>
> That is exactly what I (think I) want. The utility is admittedly
> marginal but perhaps not trivial. It's the difference between a
> declarative approach, which I take to be intrinsically more accessible
> and intuitive, especially to non-programmers, versus an imperative
> one. It's essentially the case for custom options in general.
>
> I suppose my maximalist claim would be that mode-defined keymaps are
> self-evidently customize options that have somehow historically been
> accidentally overlooked. I'm not entirely convinced myself, though.
> Maybe we should just let it sit for a while. There's obviously
> something about it that doesn't *feel* right to people with deeper
> insight than I have.