From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dave Abrahams Newsgroups: gmane.emacs.bugs Subject: bug#15766: 24.3; [patch] electric-indent-mode-bug Date: Wed, 30 Oct 2013 16:16:55 -0700 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a11c1c93aafa9fc04e9fd8804 X-Trace: ger.gmane.org 1383175177 32529 80.91.229.3 (30 Oct 2013 23:19:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Oct 2013 23:19:37 +0000 (UTC) To: 15766@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 31 00:19:41 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vbf37-0001Bf-4G for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Oct 2013 00:19:41 +0100 Original-Received: from localhost ([::1]:54824 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbf36-0008R8-NV for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Oct 2013 19:19:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbf1h-0007GM-6f for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 19:18:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vbf1X-00022N-Am for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 19:18:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbf1X-00022J-6s for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 19:18:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vbf1W-0002IC-S3 for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 19:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dave Abrahams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Oct 2013 23:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15766 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13831750708791 (code B ref -1); Wed, 30 Oct 2013 23:18:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Oct 2013 23:17:50 +0000 Original-Received: from localhost ([127.0.0.1]:53710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vbf1J-0002Hj-KC for submit@debbugs.gnu.org; Wed, 30 Oct 2013 19:17:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46733) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vbf1H-0002HV-1f for submit@debbugs.gnu.org; Wed, 30 Oct 2013 19:17:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vbf12-0001wD-7V for submit@debbugs.gnu.org; Wed, 30 Oct 2013 19:17:41 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:47446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbf12-0001w9-3q for submit@debbugs.gnu.org; Wed, 30 Oct 2013 19:17:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbf0u-0006nh-N4 for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 19:17:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vbf0n-0001tg-Cr for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 19:17:24 -0400 Original-Received: from mail-oa0-f44.google.com ([209.85.219.44]:57231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbf0n-0001tW-6S for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2013 19:17:17 -0400 Original-Received: by mail-oa0-f44.google.com with SMTP id l20so2276033oag.17 for ; Wed, 30 Oct 2013 16:17:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=Zg8C/93Po7b48sHsI3iKwwPRCKM5wu2LnFZUcM8SbRI=; b=csUbuSfkeYuXeRheE/HH5yJaRfp1Uz43kXOF//cr9ZpOvam3YP49s7iTQ5rcHgtDmd hN1A1oncWUaDoKTchWy18fUVuzUfD0KETPm1K0anX2FEXJl3ea9IF1k3cqz2Kbp7ZIaO wO0jKj0kssQJyARpDDpZBYBCu++8ewlJobmDWN96Ld7q4sEwQ8rkaXLP3xAoEwx1U1qp A8/DkyRw23zmr/GCFJCmNFu13r6sEDNKmBGFB2ps+UOClU3cO4FBR+oA1GZAV8oIoIZn j/v5iVEsX5QxPSe5R5QO6KDGyptqhfcZq3ekiKs7AiDQQYApw4P0XBrpS+aWX/XyTE31 ztaQ== X-Gm-Message-State: ALoCoQk1YQIdpp9f4klr2VsDgdoPmUU9TxkQWZcb+05/wQL9SfD2iH3M7CHNT8YRNQGL8b1+szyS X-Received: by 10.182.53.196 with SMTP id d4mr122849obp.7.1383175035983; Wed, 30 Oct 2013 16:17:15 -0700 (PDT) Original-Received: by 10.182.232.166 with HTTP; Wed, 30 Oct 2013 16:16:55 -0700 (PDT) X-Originating-IP: [17.226.35.26] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79801 Archived-At: --001a11c1c93aafa9fc04e9fd8804 Content-Type: multipart/alternative; boundary=001a11c1c93aafa9f804e9fd8802 --001a11c1c93aafa9f804e9fd8802 Content-Type: text/plain; charset=ISO-8859-1 1. emacs -Q 2. eval the following: (electric-indent-mode) (electric-layout-mode) (setq electric-indent-chars (append "{}" electric-indent-chars)) (setq electric-layout-rules '((?\{ . after) (?\} . before))) 3. type `f o o {' Result expected: a buffer containing ----- schnipp ----- foo { ----- schnapp ----- Result received: a buffer containing ----- schnipp ----- foo{ ----- schnapp ----- Patch is enclosed that fixes the problem. -- Dave Abrahams --001a11c1c93aafa9f804e9fd8802 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
1. emacs -Q
2. eval the following:

=A0 (electri= c-indent-mode)
=A0 (= electric-layout-mode)
=A0 (setq electric-indent-chars (append "{}" elec= tric-indent-chars))
=A0 (= setq electric-layout-rules '((?\{ . after) (?\} . before)))

3. ty= pe `f o o {'

Resul= t expected: a buffer containing
----- schnipp -----
foo {=
=
----- schnap= p -----

Result recei= ved: a buffer containing
-----= schnipp -----
foo{

----- schnap= p -----

Patch is enc= losed that fixes the problem.

--
Dave Abrahams

--001a11c1c93aafa9f804e9fd8802-- --001a11c1c93aafa9fc04e9fd8804 Content-Type: application/octet-stream; name="electric.el.patch" Content-Disposition: attachment; filename="electric.el.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hnf6oclt0 ZGlmZiAtLWdpdCBhL2xpc3AvZWxlY3RyaWMuZWwgYi9saXNwL2VsZWN0cmljLmVsCmluZGV4IDU4 YjhlMTAuLmU0MjU3YjIgMTAwNjQ0Ci0tLSBhL2xpc3AvZWxlY3RyaWMuZWwKKysrIGIvbGlzcC9l bGVjdHJpYy5lbApAQCAtMjEyLDcgKzIxMiw3IEBAIHBvaW50IHJpZ2h0IGFmdGVyIHRoYXQgY2hh ciwgYW5kIGl0IHNob3VsZCByZXR1cm4gdCB0byBjYXVzZSBpbmRlbnRhdGlvbiwKICAgOzsgZWxl Y3RyaWMtcGFpci1tb2RlIHdyYXBwaW5nIGEgcmVnaW9uIHdpdGggYSBwYWlyIG9mIHBhcmVucy4K ICAgOzsgVGhlcmUgbWlnaHQgYmUgYSB3YXkgdG8gZ2V0IGl0IHdvcmtpbmcgYnkgYW5hbHl6aW5n IGJ1ZmZlci11bmRvLWxpc3QsIGJ1dAogICA7OyBpdCBsb29rcyBjaGFsbGVuZ2luZy4KLSAgKGxl dCAocG9zKQorICAobGV0IChwb3MgbGluZS1iZWdpbm5pbmctcG9zKQogICAgICh3aGVuIChhbmQK ICAgICAgICAgICAgZWxlY3RyaWMtaW5kZW50LW1vZGUKICAgICAgICAgICAgOzsgRG9uJ3QgcmVp bmRlbnQgd2hpbGUgaW5zZXJ0aW5nIHNwYWNlcyBhdCBiZWdpbm5pbmcgb2YgbGluZS4KQEAgLTIy MSw2ICsyMjEsNyBAQCBwb2ludCByaWdodCBhZnRlciB0aGF0IGNoYXIsIGFuZCBpdCBzaG91bGQg cmV0dXJuIHQgdG8gY2F1c2UgaW5kZW50YXRpb24sCiAgICAgICAgICAgIChzZXRxIHBvcyAoZWxl Y3RyaWMtLWFmdGVyLWNoYXItcG9zKSkKICAgICAgICAgICAgKHNhdmUtZXhjdXJzaW9uCiAgICAg ICAgICAgICAgKGdvdG8tY2hhciBwb3MpCisgICAgICAgICAgICAgKHNldHEgbGluZS1iZWdpbm5p bmctcG9zIChsaW5lLWJlZ2lubmluZy1wb3NpdGlvbikpCiAgICAgICAgICAgICAgKGxldCAoKGFj dCAob3IgKHJ1bi1ob29rLXdpdGgtYXJncy11bnRpbC1zdWNjZXNzCiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICdlbGVjdHJpYy1pbmRlbnQtZnVuY3Rpb25zCiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGxhc3QtY29tbWFuZC1ldmVudCkKQEAgLTIzMSw3ICsyMzIsNyBAQCBwb2lu dCByaWdodCBhZnRlciB0aGF0IGNoYXIsIGFuZCBpdCBzaG91bGQgcmV0dXJuIHQgdG8gY2F1c2Ug aW5kZW50YXRpb24sCiAgICAgICAgICAgICAgICAgICAgICh1bmxlc3MgKGVxIGFjdCAnZG8taW5k ZW50KSAobnRoIDggKHN5bnRheC1wcHNzKSkpKSkpKSkKICAgICAgIDs7IEZvciBuZXdsaW5lLCB3 ZSB3YW50IHRvIHJlaW5kZW50IGJvdGggbGluZXMgYW5kIGJhc2ljYWxseSBiZWhhdmUgbGlrZQog ICAgICAgOzsgcmVpbmRlbnQtdGhlbi1uZXdsaW5lLWFuZC1pbmRlbnQgKHdob3NlIGNvZGUgd2Ug aGVuY2UgY29waWVkKS4KLSAgICAgICh3aGVuICg8ICgxLSBwb3MpIChsaW5lLWJlZ2lubmluZy1w b3NpdGlvbikpCisgICAgICAod2hlbiAoPCAoMS0gcG9zKSBsaW5lLWJlZ2lubmluZy1wb3MpCiAg ICAgICAgIChsZXQgKChiZWZvcmUgKGNvcHktbWFya2VyICgxLSBwb3MpIHQpKSkKICAgICAgICAg ICAoc2F2ZS1leGN1cnNpb24KICAgICAgICAgICAgICh1bmxlc3MgKG1lbXEgaW5kZW50LWxpbmUt ZnVuY3Rpb24K --001a11c1c93aafa9fc04e9fd8804--