Subject: bug#56407: 29.0.50; desktop.el shouldn't be saving/restoring eglot--managed-mode, which is not for interactive use

From: João Távora <[email-masked]>
Date: Wed, 6 Jul 2022 13:59:51 +0100

>
> > But then I'd say it is even worse, as you're informing desktop.el
> > about an implementation detail of eglot.el.  If I change that minor
> > mode's name, then I have to change desktop.el as well.
>
> That's okay: it's desktop.el's job to know about some implementation
> details.  Just look at how much it knows about what the various modes
> and variables do in Emacs.

Wait, you're saying it's "okay" to have to do a commit to Emacs's repo
everytime someone makes a third-party package that has a minor mode
that needs special handling?  Or everytime someone changes the name
or shape of a minor mode?

I can't possibly see how this is okay. There should simply be a generic
mechanism for minor-modes to tell desktop.el and other intrusive
packages to "stay out of my minor mode".

But we do have that mechanism. It's called symbol properties and it's a nice
feature of lisp. So let's use it, please. All the other solutions are
demonstrably
worse.  I'm not even saying to get rid of d-m-m-table, as Lars is.  I'm
just
saying: let's not type "name-of-eglot-symbol-that-joao-may-want-to-change"
into desktop.el.  It's really a hazard.

João