emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fixing post-self-insert-hook.


From: Eli Zaretskii
Subject: Re: Fixing post-self-insert-hook.
Date: Sat, 18 Sep 2021 14:04:44 +0300

> Date: Sat, 18 Sep 2021 09:57:19 +0000
> Cc: emacs-devel@gnu.org, joaotavora@gmail.com
> From: Alan Mackenzie <acm@muc.de>
> 
> > If CC Mode has problem with these hooks, it could bind them to nil
> > around the call to self-insert-command, couldn't it?
> 
> That has indeed been done since early 2019.  It's not nice.  It involves
> c-electric-brace knowing that one of the entries in post-self-insert-hook
> is electric-pair-post-self-insert-function, and calling it explicitly.
> It couples the electric-... minor modes with CC Mode, and blocks out any
> other functionality on the hook from CC Mode.
> 
> > That'd be much better than making any globally-visible change in
> > behavior, for which we cannot possibly know the unintended
> > consequences.
> 
> The mechanism is currently broken.  Do we stick with this known breakage
> for fear of an unknown, not particularly likely one, or do we fix it?

The former, I hope.

> > In any case, please let's not make this change before the emacs-28
> > branch is cut, as it can potentially disrupt many places.
> 
> Yes.  But surely we have enough time before Emacs 29 for any problems it
> might cause to come to light.

I don't know.  We don't even have any clear idea of what problems it
causes in practice, only some vague fears of such problems.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]