[Top][All Lists]

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

Re: Apropos 54f297904e0c: Temporarily comment out CC Mode from tests whi

From: Alan Mackenzie
Subject: Re: Apropos 54f297904e0c: Temporarily comment out CC Mode from tests which are incompatible with it.
Date: Fri, 18 Jan 2019 22:53:03 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, João.

I'm answering you with a top post (with no bottom) because our exchange
has become so voluminous.

Firstly I insist that you respect my maintainership of CC Mode; that I
understand it better than you, I know its history, its tradeoffs, its
problems.  And that things like your patch of yesterday, which was
grossly disrespectful, will not be repeated.

In my turn, I will not mess with the electric-... functions.  If you
prefer, I will also not mess with electric-tests.el.  I did not realise
you felt proprietorial over it.

And I request you to tone down your aggressiveness.  The aggressiveness
is entirely on the side of electric-....  I merely want CC Mode to
continue working as it has done for several decades.  You are
continually attacking it.  CC Mode and I are under constant siege, but
just want to be left in peace.  Yet I get from you continually "change
CC Mode this way, introduce c-self-insert-command, change CC Mode the
other way", on and on and on, ceaselessly.  All for your convenience.

c-electric-brace and friends depend for their proper working on knowing
or controlling every character that is inserted into or deleted from the
buffer.  When random functionality (from the point of view of
c-electric-brace) is added to self-insert-command, these functions
cannot work.  That is why it is essential to bind post-self-insert-hook
to nil in c-electric-brace.  It is why c-electric-brace is incompatible
with the (ab)use of post-self-insert-hook by certain electric-...

I insist you respect the need for the correct functioning of
c-electric-brace and friends.  And that you cease false insinuations
such as c-auto-newline being merely a "corner case" - it is an integral
part of CC Mode's functionality, and it will remain supported, and it
will remain.

Beatrix Klebe's bug was about c-auto-newline.  It was not about
electric-layout-mode.  It is now fixed.

You want electric-layout etc., to be the same for every major mode?
Then please create interfaces to them which are usable by every mode,
including CC Mode (see above).

I'm not happy with your response to my request for recipes which show
how CC Mode supposedly doesn't work with electric-pair-mode.  That
around 80 tests fail shows nothing - (at least some of) the tests are
broken.  You suggest that I should put in the hard work of extracting
recipes from your tests myself.  Sorry, that's a lot of work and I've
got other things to do.  The successful uses of electric-pair-mode I
reported earlier were on the Emacs after my patch but without your
patch.  As far as I'm concerned, electric-pair-mode works just fine in
CC Mode, until I see a coherent recipe that breaks it.  Then I will fix

The false assumption that these tests make is that they can rely on
certain settings in post-self-insert-hook.  Any major mode is at liberty
to bind or set this hook, and as pointed out above, CC Mode _must_ bind
this to nil in c-electric-brace, etc..  Would you please amend these
tests to take this into account.

And I ask you, have you tried using c-auto-newline?  It is easy to set
up (a single line in your c-mode-common-hook, or interactively C-c C-a).
The CC Mode style system takes care of the rest of the setup most of the
time.  If not, why not?

I do not attack electric-layout-mode.  I merely note that it would be
less good (if it could work) than CC Mode's own features in the context
of CC Mode.  For example, c-auto-newline handles different braces
differently, depending on their syntactic context.  electric-layout-mode
does not.  electric-layout-mode is not needed in CC Mode.  

You say that things you've had working since Emacs 24.4 are now not
working.  Do you mean electric-layout-mode?  If so, that "working" was
an illusion, not reality.  I hope I've said enough to explain why that
minor mode can't work in CC Mode, and that a better alternative exists.

Sometime in the next few days, I'm going to revert your patch to
cc-cmds.el.  I earnestly request you to modify electric-tests.el to
take account of this.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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