[Top][All Lists]

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

Re: Fixing post-self-insert-hook.

From: Stefan Monnier
Subject: Re: Fixing post-self-insert-hook.
Date: Sun, 19 Sep 2021 08:59:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> My alternative suggestion, which I've offered now and then, over the
>> years, is for you to study how cc-mode behaves when you bind the
>> delimiter keys simply to 'self-insert-command' ....
> You know full well that this is problematic.

I can't speak for João, but no I don't.

>> and refrain from re-inventing 'electric-pair-mode' inside cc-mode.
> I sometimes wonder if such a reimplementation inside CC Mode might have

I don't understand the "might".  You do have such a "reimplementation"
(and you even implemented it before `electric-*-mode`).

The difficulty you're facing is due to the face that contrary to all
other major modes which used to have such features, you decided to keep
your implementation and try to make it interact correctly with
`electric-*-mode`s.  There's no doubt that this is hard.  I do doubt
whether it's useful, OTOH.

I understand your desire to preserve exactly the featureset you designed
for CC-mode, rather than rely on the `electric-*-mode`s features which
aren't exactly equivalent and aren't configured in the same way.
So you gave more importance to preserving compatibility with older
Emacs/CC-mode, whereas I give more importance to harmonization of
configuration and behavior across major modes.

> been less work than all the email exchange with you trying to get you to
> fix things.

There is a simpler solution at hand.  You say it's "problematic", but
all solutions have their downsides.

>> I must be honest.  I don't really expect you arrive at that conclusion
>> or even try that experiment.
> No.  I have a user base to consider.

Some of your user base would appreciate not having to do things
differently in CC-modes than in other modes.


reply via email to

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