From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#33794: 26.1; electric-pair-mode breaks auto-newline minor mode of cc-mode Date: Sat, 22 Dec 2018 02:41:43 +0000 Message-ID: <20181222024143.GA3985@ACM> References: <20181221134829.29135.qmail@mail.muc.de> <87tvj68j15.fsf@gmail.com> <87pntu8fx8.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1545446827 23554 195.159.176.226 (22 Dec 2018 02:47:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Dec 2018 02:47:07 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: bea@klebe.blog, 33794@debbugs.gnu.org, Stefan Monnier , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Beatrix Klebe Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 22 03:47:03 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gaXJe-00061W-O5 for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Dec 2018 03:47:02 +0100 Original-Received: from localhost ([::1]:49482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaXLl-0008SK-J6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Dec 2018 21:49:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaXLe-0008S3-IF for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2018 21:49:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gaXLd-0003ni-WF for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2018 21:49:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54764) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gaXLa-0003k9-JR; Fri, 21 Dec 2018 21:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gaXLa-0002GI-G6; Fri, 21 Dec 2018 21:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sat, 22 Dec 2018 02:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33794 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 33794-submit@debbugs.gnu.org id=B33794.15454469048643 (code B ref 33794); Sat, 22 Dec 2018 02:49:02 +0000 Original-Received: (at 33794) by debbugs.gnu.org; 22 Dec 2018 02:48:24 +0000 Original-Received: from localhost ([127.0.0.1]:59022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gaXKx-0002FL-Rk for submit@debbugs.gnu.org; Fri, 21 Dec 2018 21:48:24 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:50636 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1gaXKw-0002FD-NR for 33794@debbugs.gnu.org; Fri, 21 Dec 2018 21:48:23 -0500 Original-Received: (qmail 34061 invoked by uid 3782); 22 Dec 2018 02:48:21 -0000 Original-Received: from acm.muc.de (p2E5D5AAE.dip0.t-ipconnect.de [46.93.90.174]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 22 Dec 2018 03:48:20 +0100 Original-Received: (qmail 3992 invoked by uid 1000); 22 Dec 2018 02:41:43 -0000 Content-Disposition: inline In-Reply-To: <87pntu8fx8.fsf@gmail.com> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153712 Archived-At: Hello, Beatrix. As maintainer of CC Mode, I earnestly recommend you NOT to follow Joćo's suggestion. It will not work, and will waste your time. Even if it appears to work, you will end up picking out bugs for an indeterminate period. Basically, electric-pair-mode as it is currently built is incompatible with CC Mode, as I have pointed out here, albeit somewhat undiplomatically. I suggest you do nothing until tempers amongst Emacs developers have cooled down, and hopefully a genuine solution to the bug has been worked out and implemented. -- Alan Mackenzie (Nuremberg, Germany). On Sat, Dec 22, 2018 at 02:16:03 +0000, Joćo Tįvora wrote: > Hi again Beatrix, > In the latest version of the patch I am preparing, if you do > (add-hook 'c-mode-hook > (lambda () > (setq-local electric-layout-rules > '((?\{ . before}) > (?\{ . after) > (?\{ . after-stay))))) > You should arive at Allman C-style electric layouts. So typing > int main () then brace should give you: > int main () > { > > } > I attach the two patches for convenience, which you can also find in the > scratch/fix-33794-extend-electric-layout-mode branch. > Joćo