GNU bug report logs - #33794
26.1; electric-pair-mode breaks auto-newline minor mode of cc-mode

Previous Next

Packages: emacs, cc-mode;

Reported by: bea <at> klebe.blog

Date: Tue, 18 Dec 2018 17:48:02 UTC

Severity: normal

Found in version 26.1

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #83 received at 33794 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Beatrix Klebe <beeuhtricks <at> gmail.com>
Cc: Alan Mackenzie <acm <at> muc.de>, bea <at> klebe.blog,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 33794 <at> debbugs.gnu.org
Subject: Re: bug#33794: 26.1;
 electric-pair-mode breaks auto-newline minor mode of cc-mode
Date: Sat, 22 Dec 2018 21:19:22 +0000
Beatrix Klebe <beeuhtricks <at> gmail.com> writes:

> Well, in that case, I am flattered that my opinion is given much
> weight in this.

It's supposed to work like that everyday in the Emacs bug tracker.  If
it flatters you, so much the better :-)

> Things such as c-toggle-auto-newline, for example, almost seem in this
> case that they might be better delegated to electric-layout-mode, with
> cc-mode specifying different electric-layout constraints for its
> different formatting styles. It seems this is close to what João was
> suggesting?

Yes, that is precisely what I am suggesting.  I am happy that this point
made it across.

Though there is not any need to give up on c-toggle-auto-newline if you
don't use electric-pair-mode, or if you use some other tool like
smartparens, or perhaps even my older tool autopair.el (tho those tools
might have other drawbacks that I don't known)

> And I suspect what Alan disagrees with? I apologize for any
> misunderstanding.

Yes, Alan disagrees with this.  In his view, electric- modes are abusing
the semantics of post-self-insert-hook.  Well, at least in my view of
his views :-)

João

PS: I'm cleaning up the implementation of the more powerful
electric-layout mode in branch
scratch/fix-33794-extend-electric-layout-mode.  I'll let you know
if/when it is merged.




This bug report was last modified 6 years and 187 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.