Subject: bug#38406: 27.0.50; post-self-insert-hook does not hold its contract in cc-mode derived modes

From: Eli Zaretskii <[email-masked]>
Date: Sun, 01 Dec 2019 19:59:54 +0200

> Date: Sun, 1 Dec 2019 15:07:38 +0000
> From: Alan Mackenzie <[email-masked]>
> Cc: [email-masked]
> 
> > > There are other possible "fixes", for example modifying these functions
> > > so that they don't use self-insert-command at all, but somehow I don't
> > > think that's what you want.
> 
> > I don't think that the code that is implemented against the contract listed
> > in the hook documentation should be rewritten. If electric stuff is so
> > that important and there is no way to disable it by default then at
> > least a function to unbind the electric functionality the
> > documentation of post-self-insert-hook should state: "Don't rely on
> > this hook in cc derived modes because of {implementation details}. If
> > you still want to use post-self-insert-hook disable use
> > {implementation details} to turn electric off."
> 
> The problem you have stumbled over is more of a political problem than a
> technical one.

Can we please make it technical again?  Why can't the CC Mode function
which temporarily disables post-self-insert-hook call the hook
functions after it does its thing?  (I think I already asked this in
the past, but I cannot find that question of any discussion of it.)