From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 04:31:58 2013 Received: (at submit) by debbugs.gnu.org; 26 Sep 2013 08:31:58 +0000 Received: from localhost ([127.0.0.1]:36985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VP6zM-0005SP-TO for submit@debbugs.gnu.org; Thu, 26 Sep 2013 04:31:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38776) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VP6zK-0005SF-OT for submit@debbugs.gnu.org; Thu, 26 Sep 2013 04:31:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VP6zG-00066D-3o for submit@debbugs.gnu.org; Thu, 26 Sep 2013 04:31:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VP6zF-000669-WA for submit@debbugs.gnu.org; Thu, 26 Sep 2013 04:31:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VP6zE-0006S5-Od for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2013 04:31:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VP6zA-0005wT-1q for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2013 04:31:48 -0400 Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]:37360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VP6z9-0005vW-Sa for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2013 04:31:43 -0400 Received: by mail-ob0-f173.google.com with SMTP id vb8so1493243obc.32 for ; Thu, 26 Sep 2013 01:31:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=u4affi4Plx3GlTucYWXfC0lvcfsJc2D89HaFNmvDDTc=; b=uvBw9P/MCLrtPi+N9JTGePqbaXfy0o23j49HK4sa2xgR92SXKHjEwzQzXy03qpa3a/ 7J+9J/Q6KJ/j+vIjngP/FdYylIK3fU5B6/PZKn0dGp+xLDkKUX+nSDvVzMYjBnMqFAPM vi0f6e5UQjCAQ+vHcQIl0Phg/ky0RrN99Sqe4cykTCa1wbKS/IAw/7l8+VGicmGfegzW 0kX4W9nc4FG4XPBoqfAKbw58rZw63XyiS93LUNr21z8fN7Q0ekc+I7M998X0p8ZhbVkR 54lqWChGmo8i0Jl004IV+rqbP2GPZ1l8tnYBdQ7YwHdpQHK7E/Bk8tImjLNWE/PKV0/e bkkQ== MIME-Version: 1.0 X-Received: by 10.60.95.229 with SMTP id dn5mr20801427oeb.26.1380184303296; Thu, 26 Sep 2013 01:31:43 -0700 (PDT) Received: by 10.182.200.163 with HTTP; Thu, 26 Sep 2013 01:31:43 -0700 (PDT) Date: Thu, 26 Sep 2013 10:31:43 +0200 Message-ID: Subject: CC-mode misaligns enums that implement an interface in Java From: Paul Pogonyshev To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=089e0118470a1f660a04e74533ac X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e0118470a1f660a04e74533ac Content-Type: text/plain; charset=UTF-8 Since Java mode finally got some improvements recently, maybe someone can solve this too. In Java, enumerations can implement interfaces. However, CC-mode doesn't handle that well. Compare this indentation, for example: public enum X { A, B; } vs. public enum X implements Y { A, B; } Fontification of 'A' and 'B' also changes when I add 'implements' keyword. Paul --089e0118470a1f660a04e74533ac Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Since Java mode finally got some improvements recentl= y, maybe someone can solve this too. In Java, enumerations can implement in= terfaces. However, CC-mode doesn't handle that well. Compare this inden= tation, for example:

public enum X
{
=C2=A0=C2=A0=C2=A0 A,
=C2=A0=C2=A0=C2=A0 B;}

vs.

public enum X implements Y
{
=C2=A0= =C2=A0=C2=A0 A,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 B;
}
Fontification of 'A' and 'B' also changes when= I add 'implements' keyword.

Paul

--089e0118470a1f660a04e74533ac-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 28 13:35:24 2013 Received: (at 15465) by debbugs.gnu.org; 28 Sep 2013 17:35:24 +0000 Received: from localhost ([127.0.0.1]:43323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VPyQJ-0000Tf-QO for submit@debbugs.gnu.org; Sat, 28 Sep 2013 13:35:24 -0400 Received: from colin.muc.de ([193.149.48.1]:13327 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VPyQC-0000TJ-Eo for 15465@debbugs.gnu.org; Sat, 28 Sep 2013 13:35:17 -0400 Received: (qmail 47671 invoked by uid 3782); 28 Sep 2013 17:35:11 -0000 Received: from acm.muc.de (pD951A22A.dip0.t-ipconnect.de [217.81.162.42]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 28 Sep 2013 19:35:10 +0200 Received: (qmail 11369 invoked by uid 1000); 28 Sep 2013 17:33:23 -0000 Date: Sat, 28 Sep 2013 17:33:23 +0000 To: Paul Pogonyshev Subject: Re: bug#15465: CC-mode misaligns enums that implement an interface in Java Message-ID: <20130928173323.GA11317@acm.acm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 15465 Cc: 15465@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.1 (---) Hi, Paul. Paul Pogonyshev , wrote: > Since Java mode finally got some improvements recently, maybe someone > can solve this too. In Java, enumerations can implement interfaces. > However, CC-mode doesn't handle that well. Compare this indentation, > for example: > public enum X > { > A, > B; > } > vs. > public enum X implements Y > { > A, > B; > } Yes, that is a bug. It happens because the code that checks for being inside an "enum" body only searches a maximum of two tokens backwards from the "{" for the "enum" keyword. > Fontification of 'A' and 'B' also changes when I add 'implements' > keyword. This was happening on any buffer change near the "{" for basically the same reason. I've committed a fix, revision #114474, to the bzr trunk. Could you try out the change, please, and either confirm it fixes the bug properly, or tell me what hasn't yet been fixed. Thanks for taking the trouble to report this, and thanks even more that the report was so crisp, concise and to the point. Paul -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 28 15:15:55 2013 Received: (at 15465) by debbugs.gnu.org; 28 Sep 2013 19:15:55 +0000 Received: from localhost ([127.0.0.1]:43533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VPzzf-0003vK-Bn for submit@debbugs.gnu.org; Sat, 28 Sep 2013 15:15:55 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:55897) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VPzzc-0003vA-Rx for 15465@debbugs.gnu.org; Sat, 28 Sep 2013 15:15:53 -0400 Received: by mail-ob0-f173.google.com with SMTP id vb8so4112774obc.18 for <15465@debbugs.gnu.org>; Sat, 28 Sep 2013 12:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=84wovnk4iONuY9vUTYWb4b4MFumkfZHAPYSutjjArSo=; b=X2ODxaSSrDGK9yv7YeKPSwPLGGzCike5iZ8UBU/8Z+Wd3UoQ7/8Ldw+qSCLABT1u0H pEVgkOv1ReMCesgqHRRvH8cPDQYNty+zUF6kYjIsD/IxyQwDJlIbFflK2Qeqw4kYHgOi 7g2ZfuNlCNtuPLUkHsU1K7hXVMDdeCGm8fGhEGyQ+mvJ//pOHB52B0NDDIBdbShV8CJh AT0Gu9pNuGXtKa09mCoSx+OaBDgthZBdIROI1Grd0x6NbQ7UCeRZeSi11SEp8wgH2FRt 4W4TTc5X2GVUFtvFLnTxVlCAZa/EZgO99mgJd3mElyHNof3DQ2LvModorJ8+2iKXCklw oMkA== MIME-Version: 1.0 X-Received: by 10.182.104.36 with SMTP id gb4mr1850381obb.43.1380395752287; Sat, 28 Sep 2013 12:15:52 -0700 (PDT) Received: by 10.182.200.163 with HTTP; Sat, 28 Sep 2013 12:15:52 -0700 (PDT) In-Reply-To: <20130928173323.GA11317@acm.acm> References: <20130928173323.GA11317@acm.acm> Date: Sat, 28 Sep 2013 21:15:52 +0200 Message-ID: Subject: Re: bug#15465: CC-mode misaligns enums that implement an interface in Java From: Paul Pogonyshev To: Alan Mackenzie Content-Type: multipart/alternative; boundary=089e013a215a76f3ef04e7766ef0 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15465 Cc: 15465@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --089e013a215a76f3ef04e7766ef0 Content-Type: text/plain; charset=UTF-8 > I've committed a fix, revision #114474, to the bzr trunk. Could you try > out the change, please, and either confirm it fixes the bug properly, or > tell me what hasn't yet been fixed. Thank you. The case I initially mentioned works properly now, also with multiple implemented interfaces. However, it seems to not know about interfaces with generics: public enum X implements Y { A, B; } Paul --089e013a215a76f3ef04e7766ef0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> I've committed a fix, revision #114474, to the bzr trunk. =C2=A0Co= uld you try
>=20 out the change, please, and either confirm it fixes the bug properly, or>=20 tell me what hasn't yet been fixed.

Thank you. The case I = initially mentioned works properly now, also with multiple implemented inte= rfaces. However, it seems to not know about interfaces with generics:

public enum X implements Y <Z>
{
=C2=A0=C2=A0=C2=A0 A,=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 B;
}

Pa= ul
--089e013a215a76f3ef04e7766ef0-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 28 17:34:59 2013 Received: (at 15465) by debbugs.gnu.org; 28 Sep 2013 21:34:59 +0000 Received: from localhost ([127.0.0.1]:43754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQ2AE-0007BP-UN for submit@debbugs.gnu.org; Sat, 28 Sep 2013 17:34:59 -0400 Received: from colin.muc.de ([193.149.48.1]:58355 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQ2AB-0007BE-SW for 15465@debbugs.gnu.org; Sat, 28 Sep 2013 17:34:56 -0400 Received: (qmail 62158 invoked by uid 3782); 28 Sep 2013 21:34:54 -0000 Received: from acm.muc.de (pD951A22A.dip0.t-ipconnect.de [217.81.162.42]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 28 Sep 2013 23:34:53 +0200 Received: (qmail 13327 invoked by uid 1000); 28 Sep 2013 21:33:12 -0000 Date: Sat, 28 Sep 2013 21:33:12 +0000 To: Paul Pogonyshev Subject: Re: bug#15465: CC-mode misaligns enums that implement an interface in Java Message-ID: <20130928213311.GE11317@acm.acm> References: <20130928173323.GA11317@acm.acm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 15465 Cc: 15465@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.1 (---) Hi, Paul. On Sat, Sep 28, 2013 at 09:15:52PM +0200, Paul Pogonyshev wrote: > > I've committed a fix, revision #114474, to the bzr trunk. Could you try > > out the change, please, and either confirm it fixes the bug properly, or > > tell me what hasn't yet been fixed. > Thank you. The case I initially mentioned works properly now, also with > multiple implemented interfaces. However, it seems to not know about > interfaces with generics: > public enum X implements Y > { > A, > B; > } OK! I think the following enhancement should help out here: diff -r d51d11733869 cc-engine.el --- a/cc-engine.el Sat Sep 28 16:39:26 2013 +0000 +++ b/cc-engine.el Sat Sep 28 21:27:53 2013 +0000 @@ -8534,6 +8534,10 @@ (setq before-identifier nil) t) ((looking-at c-brace-list-key) nil) + ((and c-recognize-<>-arglists + (eq (char-after) ?<) + (looking-at "\\s(")) + t) (t nil)))) (looking-at c-brace-list-key)))) ;; this will pick up array/aggregate init lists, even if they are nested. diff -r d51d11733869 cc-fonts.el --- a/cc-fonts.el Sat Sep 28 16:39:26 2013 +0000 +++ b/cc-fonts.el Sat Sep 28 21:27:53 2013 +0000 @@ -1452,6 +1452,10 @@ (setq before-identifier nil) t) ((looking-at c-brace-list-key) nil) ; "enum" + ((and c-recognize-<>-arglists + (eq (char-after) ?<) + (looking-at "\\s(")) + t) (t nil)))) (looking-at c-brace-list-key))))))) (c-forward-token-2) @@ -1556,6 +1560,10 @@ (setq before-identifier nil) t) ((looking-at c-brace-list-key) nil) ; "enum" + ((and c-recognize-<>-arglists + (eq (char-after) ?<) + (looking-at "\\s(")) + t) (t nil)))) (looking-at c-brace-list-key))))) (c-syntactic-skip-backward "^{," nil t) > Paul -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 29 11:05:40 2013 Received: (at 15465) by debbugs.gnu.org; 29 Sep 2013 15:05:40 +0000 Received: from localhost ([127.0.0.1]:44927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQIZ1-0000Uw-DO for submit@debbugs.gnu.org; Sun, 29 Sep 2013 11:05:39 -0400 Received: from colin.muc.de ([193.149.48.1]:10272 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQIYw-0000Uj-Cf for 15465@debbugs.gnu.org; Sun, 29 Sep 2013 11:05:35 -0400 Received: (qmail 27690 invoked by uid 3782); 29 Sep 2013 15:05:32 -0000 Received: from acm.muc.de (p5492C855.dip0.t-ipconnect.de [84.146.200.85]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 29 Sep 2013 17:05:31 +0200 Received: (qmail 4865 invoked by uid 1000); 29 Sep 2013 15:03:45 -0000 Date: Sun, 29 Sep 2013 15:03:45 +0000 To: Paul Pogonyshev Subject: Re: bug#15465: CC-mode misaligns enums that implement an interface in Java Message-ID: <20130929150345.GD3161@acm.acm> References: <20130928173323.GA11317@acm.acm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 15465 Cc: 15465@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Hi, Paul. On Sat, Sep 28, 2013 at 09:15:52PM +0200, Paul Pogonyshev wrote: > > I've committed a fix, revision #114474, to the bzr trunk. Could you try > > out the change, please, and either confirm it fixes the bug properly, or > > tell me what hasn't yet been fixed. > Thank you. The case I initially mentioned works properly now, also with > multiple implemented interfaces. However, it seems to not know about > interfaces with generics: > public enum X implements Y > { > A, > B; > } Here's a better patch than the one from last night, which was demonstrably buggy. It should apply cleanly to the current trunk. Please let me know how thoroughly it works. diff -r d51d11733869 cc-engine.el --- a/cc-engine.el Sat Sep 28 16:39:26 2013 +0000 +++ b/cc-engine.el Sun Sep 29 14:57:33 2013 +0000 @@ -8506,6 +8506,32 @@ (not (looking-at "="))))) b-pos))) +(defun c-backward-over-enum-header () + ;; We're at a "{". Move back to the enum-like keyword that starts this + ;; declaration and return t, otherwise don't move and return nil. + (let ((here (point)) + up-sexp-pos before-identifier) + (while + (and + (eq (c-backward-token-2) 0) + (or (not (looking-at "\\s)")) + (c-go-up-list-backward)) + (cond + ((and (looking-at c-symbol-key) (c-on-identifier)) + (setq before-identifier t)) + ((and before-identifier + (looking-at c-postfix-decl-spec-key)) + (setq before-identifier nil) + t) + ((looking-at c-brace-list-key) nil) + ((and c-recognize-<>-arglists + (eq (char-after) ?<) + (looking-at "\\s(")) + t) + (t nil)))) + (or (looking-at c-brace-list-key) + (progn (goto-char here) nil)))) + (defun c-inside-bracelist-p (containing-sexp paren-state) ;; return the buffer position of the beginning of the brace list ;; statement if we're inside a brace list, otherwise return nil. @@ -8520,22 +8546,9 @@ ;; This function might do hidden buffer changes. (or ;; This will pick up brace list declarations. - (c-safe - (save-excursion - (goto-char containing-sexp) - (let (before-identifier) - (while - (progn - (c-forward-sexp -1) - (cond - ((c-on-identifier) (setq before-identifier t)) - ((and before-identifier - (looking-at c-postfix-decl-spec-key)) - (setq before-identifier nil) - t) - ((looking-at c-brace-list-key) nil) - (t nil)))) - (looking-at c-brace-list-key)))) + (save-excursion + (goto-char containing-sexp) + (c-backward-over-enum-header)) ;; this will pick up array/aggregate init lists, even if they are nested. (save-excursion (let ((class-key diff -r d51d11733869 cc-fonts.el --- a/cc-fonts.el Sat Sep 28 16:39:26 2013 +0000 +++ b/cc-fonts.el Sun Sep 29 14:57:33 2013 +0000 @@ -1438,22 +1438,9 @@ (let ((paren-state (c-parse-state))) (and (numberp (car paren-state)) - (c-safe - (save-excursion - (goto-char (car paren-state)) - (let (before-identifier) - (while - (progn - (c-forward-sexp -1) - (cond - ((c-on-identifier) (setq before-identifier t)) - ((and before-identifier - (looking-at c-postfix-decl-spec-key)) - (setq before-identifier nil) - t) - ((looking-at c-brace-list-key) nil) ; "enum" - (t nil)))) - (looking-at c-brace-list-key))))))) + (save-excursion + (goto-char (car paren-state)) + (c-backward-over-enum-header))))) (c-forward-token-2) nil) @@ -1542,22 +1529,9 @@ (when (and encl-pos (eq (char-after encl-pos) ?\{) - (c-safe - (save-excursion - (goto-char encl-pos) - (let (before-identifier) - (while - (progn - (c-forward-sexp -1) - (cond - ((c-on-identifier) (setq before-identifier t)) - ((and before-identifier - (looking-at c-postfix-decl-spec-key)) - (setq before-identifier nil) - t) - ((looking-at c-brace-list-key) nil) ; "enum" - (t nil)))) - (looking-at c-brace-list-key))))) + (save-excursion + (goto-char encl-pos) + (c-backward-over-enum-header))) (c-syntactic-skip-backward "^{," nil t) (c-put-char-property (1- (point)) 'c-type 'c-decl-id-start) > Paul -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 30 03:24:00 2013 Received: (at 15465) by debbugs.gnu.org; 30 Sep 2013 07:24:00 +0000 Received: from localhost ([127.0.0.1]:45532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQXpn-0000c3-3n for submit@debbugs.gnu.org; Mon, 30 Sep 2013 03:23:59 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:37912) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQXpi-0000bq-Rr for 15465@debbugs.gnu.org; Mon, 30 Sep 2013 03:23:56 -0400 Received: by mail-ie0-f169.google.com with SMTP id tp5so9597465ieb.28 for <15465@debbugs.gnu.org>; Mon, 30 Sep 2013 00:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8ui9QyL8qHqmLYQB2VpkI8aIFHVU5u5MzZVnlLysQug=; b=rkg40KhYlTgZz8RprzMB+1cGUJMrN6m2UE1LCDDU626ReBVmxd4oLHZTvCs+4SYyc8 P9soGsFsYzO3TZiGmLzi8CHJq5PqJv4KdnGm/s+A951yqfcQOp8oH8XyuYLhclQm1Ex8 DuW3KFm551sbmmh8k07JtnuSYIgNPc6BRrqJ/nhR9z60+XJiCWNm5ujdz4ZSHadXUI36 UWvBiZ8N+kkHwdj2dDYn96jvOra3HgxjXnTE+2T8W0rXS+EXN3+LYKxSvmC4dO8qa69N 92S2PHi/DTlwJriA3Icml9PkxC63jee2368f/ZZINsfSwVt+nxWnmdjqWSuLJekkcLIt vX3g== MIME-Version: 1.0 X-Received: by 10.50.87.36 with SMTP id u4mr12780306igz.40.1380525833731; Mon, 30 Sep 2013 00:23:53 -0700 (PDT) Received: by 10.42.240.66 with HTTP; Mon, 30 Sep 2013 00:23:53 -0700 (PDT) In-Reply-To: <20130929150345.GD3161@acm.acm> References: <20130928173323.GA11317@acm.acm> <20130929150345.GD3161@acm.acm> Date: Mon, 30 Sep 2013 09:23:53 +0200 Message-ID: Subject: Re: bug#15465: CC-mode misaligns enums that implement an interface in Java From: Paul Pogonyshev To: Alan Mackenzie Content-Type: multipart/alternative; boundary=089e0111d0d8ec43fb04e794b730 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15465 Cc: 15465@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --089e0111d0d8ec43fb04e794b730 Content-Type: text/plain; charset=UTF-8 Sorry, it doesn't apply. Paul On 29 September 2013 17:03, Alan Mackenzie wrote: > Hi, Paul. > > On Sat, Sep 28, 2013 at 09:15:52PM +0200, Paul Pogonyshev wrote: > > > I've committed a fix, revision #114474, to the bzr trunk. Could you > try > > > out the change, please, and either confirm it fixes the bug properly, > or > > > tell me what hasn't yet been fixed. > > > Thank you. The case I initially mentioned works properly now, also with > > multiple implemented interfaces. However, it seems to not know about > > interfaces with generics: > > > public enum X implements Y > > { > > A, > > B; > > } > > Here's a better patch than the one from last night, which was > demonstrably buggy. It should apply cleanly to the current trunk. > Please let me know how thoroughly it works. > > > > diff -r d51d11733869 cc-engine.el > --- a/cc-engine.el Sat Sep 28 16:39:26 2013 +0000 > +++ b/cc-engine.el Sun Sep 29 14:57:33 2013 +0000 > @@ -8506,6 +8506,32 @@ > (not (looking-at "="))))) > b-pos))) > > +(defun c-backward-over-enum-header () > + ;; We're at a "{". Move back to the enum-like keyword that starts this > + ;; declaration and return t, otherwise don't move and return nil. > + (let ((here (point)) > + up-sexp-pos before-identifier) > + (while > + (and > + (eq (c-backward-token-2) 0) > + (or (not (looking-at "\\s)")) > + (c-go-up-list-backward)) > + (cond > + ((and (looking-at c-symbol-key) (c-on-identifier)) > + (setq before-identifier t)) > + ((and before-identifier > + (looking-at c-postfix-decl-spec-key)) > + (setq before-identifier nil) > + t) > + ((looking-at c-brace-list-key) nil) > + ((and c-recognize-<>-arglists > + (eq (char-after) ?<) > + (looking-at "\\s(")) > + t) > + (t nil)))) > + (or (looking-at c-brace-list-key) > + (progn (goto-char here) nil)))) > + > (defun c-inside-bracelist-p (containing-sexp paren-state) > ;; return the buffer position of the beginning of the brace list > ;; statement if we're inside a brace list, otherwise return nil. > @@ -8520,22 +8546,9 @@ > ;; This function might do hidden buffer changes. > (or > ;; This will pick up brace list declarations. > - (c-safe > - (save-excursion > - (goto-char containing-sexp) > - (let (before-identifier) > - (while > - (progn > - (c-forward-sexp -1) > - (cond > - ((c-on-identifier) (setq before-identifier t)) > - ((and before-identifier > - (looking-at c-postfix-decl-spec-key)) > - (setq before-identifier nil) > - t) > - ((looking-at c-brace-list-key) nil) > - (t nil)))) > - (looking-at c-brace-list-key)))) > + (save-excursion > + (goto-char containing-sexp) > + (c-backward-over-enum-header)) > ;; this will pick up array/aggregate init lists, even if they are > nested. > (save-excursion > (let ((class-key > diff -r d51d11733869 cc-fonts.el > --- a/cc-fonts.el Sat Sep 28 16:39:26 2013 +0000 > +++ b/cc-fonts.el Sun Sep 29 14:57:33 2013 +0000 > @@ -1438,22 +1438,9 @@ > (let ((paren-state (c-parse-state))) > (and > (numberp (car paren-state)) > - (c-safe > - (save-excursion > - (goto-char (car paren-state)) > - (let (before-identifier) > - (while > - (progn > - (c-forward-sexp -1) > - (cond > - ((c-on-identifier) (setq > before-identifier t)) > - ((and before-identifier > - (looking-at > c-postfix-decl-spec-key)) > - (setq before-identifier nil) > - t) > - ((looking-at c-brace-list-key) nil) ; > "enum" > - (t nil)))) > - (looking-at c-brace-list-key))))))) > + (save-excursion > + (goto-char (car paren-state)) > + (c-backward-over-enum-header))))) > (c-forward-token-2) > nil) > > @@ -1542,22 +1529,9 @@ > (when (and > encl-pos > (eq (char-after encl-pos) ?\{) > - (c-safe > - (save-excursion > - (goto-char encl-pos) > - (let (before-identifier) > - (while > - (progn > - (c-forward-sexp -1) > - (cond > - ((c-on-identifier) (setq before-identifier t)) > - ((and before-identifier > - (looking-at c-postfix-decl-spec-key)) > - (setq before-identifier nil) > - t) > - ((looking-at c-brace-list-key) nil) ; "enum" > - (t nil)))) > - (looking-at c-brace-list-key))))) > + (save-excursion > + (goto-char encl-pos) > + (c-backward-over-enum-header))) > (c-syntactic-skip-backward "^{," nil t) > (c-put-char-property (1- (point)) 'c-type 'c-decl-id-start) > > > > > Paul > > -- > Alan Mackenzie (Nuremberg, Germany). > --089e0111d0d8ec43fb04e794b730 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: base64 PGRpdiBkaXI9Imx0ciI+PGRpdj5Tb3JyeSwgaXQgZG9lc24mIzM5O3QgYXBwbHkuPGJyPjxicj48 L2Rpdj5QYXVsPGJyPjwvZGl2PjxkaXYgY2xhc3M9ImdtYWlsX2V4dHJhIj48YnI+PGJyPjxkaXYg Y2xhc3M9ImdtYWlsX3F1b3RlIj5PbiAyOSBTZXB0ZW1iZXIgMjAxMyAxNzowMywgQWxhbiBNYWNr ZW56aWUgPHNwYW4gZGlyPSJsdHIiPiZsdDs8YSBocmVmPSJtYWlsdG86YWNtQG11Yy5kZSIgdGFy Z2V0PSJfYmxhbmsiPmFjbUBtdWMuZGU8L2E+Jmd0Ozwvc3Bhbj4gd3JvdGU6PGJyPg0KPGJsb2Nr cXVvdGUgY2xhc3M9ImdtYWlsX3F1b3RlIiBzdHlsZT0ibWFyZ2luOjAgMCAwIC44ZXg7Ym9yZGVy LWxlZnQ6MXB4ICNjY2Mgc29saWQ7cGFkZGluZy1sZWZ0OjFleCI+PGRpdiBjbGFzcz0iaW0iPkhp LCBQYXVsLjxicj4NCjxicj4NCk9uIFNhdCwgU2VwIDI4LCAyMDEzIGF0IDA5OjE1OjUyUE0gKzAy MDAsIFBhdWwgUG9nb255c2hldiB3cm90ZTo8YnI+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rpdj4NCg== --089e0111d0d8ec43fb04e794b730-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 13 17:40:34 2013 Received: (at 15465) by debbugs.gnu.org; 13 Oct 2013 21:40:34 +0000 Received: from localhost ([127.0.0.1]:46613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VVTOr-00024l-Pi for submit@debbugs.gnu.org; Sun, 13 Oct 2013 17:40:34 -0400 Received: from colin.muc.de ([193.149.48.1]:46341 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VVTOp-00024b-7m for 15465@debbugs.gnu.org; Sun, 13 Oct 2013 17:40:32 -0400 Received: (qmail 7326 invoked by uid 3782); 13 Oct 2013 21:40:29 -0000 Received: from acm.muc.de (pD9519254.dip0.t-ipconnect.de [217.81.146.84]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 13 Oct 2013 23:40:28 +0200 Received: (qmail 20486 invoked by uid 1000); 13 Oct 2013 21:38:38 -0000 Date: Sun, 13 Oct 2013 21:38:38 +0000 To: Paul Pogonyshev Subject: Re: bug#15465: CC-mode misaligns enums that implement an interface in Java Message-ID: <20131013213838.GB2498@acm.acm> References: <20130928173323.GA11317@acm.acm> <20130929150345.GD3161@acm.acm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 15465 Cc: 15465@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.2 (-) Hello, Paul. On Mon, Sep 30, 2013 at 09:23:53AM +0200, Paul Pogonyshev wrote: > Sorry, it doesn't apply. I don't understand what's gone wrong here. Anyway, I've just committed that patch to the Emacs trunk (revision #114650). Perhaps you could try out this latest fix too, and let me know if there are any more problems in this area. Thanks! > Paul -- Alan Mackenzie (Nuremberg, Germany). > On 29 September 2013 17:03, Alan Mackenzie wrote: > > > On Sat, Sep 28, 2013 at 09:15:52PM +0200, Paul Pogonyshev wrote: > > > > I've committed a fix, revision #114474, to the bzr trunk. Could > > > > you try out the change, please, and either confirm it fixes the > > > > bug properly, or tell me what hasn't yet been fixed. > > > > > Thank you. The case I initially mentioned works properly now, also with > > > multiple implemented interfaces. However, it seems to not know about > > > interfaces with generics: > > > > > public enum X implements Y > > > { > > > A, > > > B; > > > } > > > > Here's a better patch than the one from last night, which was > > demonstrably buggy. It should apply cleanly to the current trunk. > > Please let me know how thoroughly it works. > > > > From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 05:19:48 2013 Received: (at 15465) by debbugs.gnu.org; 14 Oct 2013 09:19:48 +0000 Received: from localhost ([127.0.0.1]:47833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VVeJY-0004rY-0U for submit@debbugs.gnu.org; Mon, 14 Oct 2013 05:19:48 -0400 Received: from mail-ie0-f177.google.com ([209.85.223.177]:55505) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VVeJU-0004r9-Nc for 15465@debbugs.gnu.org; Mon, 14 Oct 2013 05:19:45 -0400 Received: by mail-ie0-f177.google.com with SMTP id e14so8668170iej.36 for <15465@debbugs.gnu.org>; Mon, 14 Oct 2013 02:19:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1FqUP/LXcAVZMVhksgZp8oLMvbYb9pJtJ7D6XvWtsmM=; b=057iB+3tb3SDVWZriua42RddyT3q74BflwH6RXzMy6Kk6CNeb2ZNOq1LmHSYsJo/TI rvErkJKPB4otgdZUP1MAFosGO7Oq0CBHDTeIoGT0BqsHFQLVFeZwWZ8fvdkC0S7TKcl6 tN8asDJVtmTmb/tlp9Xq5Y6Y+TvhIUKs/HImQ7FtGwxB/CuyFtnkyJy8hq/miwdGrhsq T+Tt8nrVtzF+g1RHf663nyuxs4A6cBsnSJlkH9iwUERW81ZveYDvIEKDJfU9xGCot+zi Nnv6x569oORm1V4QhfWPhbx739dLqv/ucRxf5/UFY959fjgzIS5lYNeSqqHT+j6J7/MJ 5k5g== MIME-Version: 1.0 X-Received: by 10.50.119.4 with SMTP id kq4mr12380176igb.40.1381742379106; Mon, 14 Oct 2013 02:19:39 -0700 (PDT) Received: by 10.42.240.66 with HTTP; Mon, 14 Oct 2013 02:19:39 -0700 (PDT) In-Reply-To: <20131013213838.GB2498@acm.acm> References: <20130928173323.GA11317@acm.acm> <20130929150345.GD3161@acm.acm> <20131013213838.GB2498@acm.acm> Date: Mon, 14 Oct 2013 11:19:39 +0200 Message-ID: Subject: Re: bug#15465: CC-mode misaligns enums that implement an interface in Java From: Paul Pogonyshev To: Alan Mackenzie Content-Type: multipart/alternative; boundary=089e013c6e4aad8ae204e8aff72e X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15465 Cc: 15465@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --089e013c6e4aad8ae204e8aff72e Content-Type: text/plain; charset=UTF-8 Um, it seems to be worse than before. I guess your first patch worked better, at least for my cases. E.g. now I have: public enum X implements Y, Z { A, B; } On a side note, enum methods (and constructors --- yes, enums can optionally have those) are fontified as variable names, though that is of course less important than indentation. Paul On 13 October 2013 23:38, Alan Mackenzie wrote: > Hello, Paul. > > On Mon, Sep 30, 2013 at 09:23:53AM +0200, Paul Pogonyshev wrote: > > Sorry, it doesn't apply. > > I don't understand what's gone wrong here. Anyway, I've just committed > that patch to the Emacs trunk (revision #114650). Perhaps you could try > out this latest fix too, and let me know if there are any more problems > in this area. Thanks! > > > Paul > > -- > Alan Mackenzie (Nuremberg, Germany). > > > > On 29 September 2013 17:03, Alan Mackenzie wrote: > > > > > On Sat, Sep 28, 2013 at 09:15:52PM +0200, Paul Pogonyshev wrote: > > > > > I've committed a fix, revision #114474, to the bzr trunk. Could > > > > > you try out the change, please, and either confirm it fixes the > > > > > bug properly, or tell me what hasn't yet been fixed. > > > > > > > Thank you. The case I initially mentioned works properly now, also > with > > > > multiple implemented interfaces. However, it seems to not know about > > > > interfaces with generics: > > > > > > > public enum X implements Y > > > > { > > > > A, > > > > B; > > > > } > > > > > > Here's a better patch than the one from last night, which was > > > demonstrably buggy. It should apply cleanly to the current trunk. > > > Please let me know how thoroughly it works. > > > > > > > --089e013c6e4aad8ae204e8aff72e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Um, it seems to be worse than before. I guess your fi= rst patch worked better, at least for my cases.

E.g. now I have:
=
public enum X implements Y, Z
{
=C2=A0=C2=A0=C2=A0 A,
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 B;
}

On a side note, enum methods (and constructors --- yes, enums ca= n optionally have those) are fontified as variable names, though that is of= course less important than indentation.

Paul


On 13 O= ctober 2013 23:38, Alan Mackenzie <acm@muc.de> wrote:
Hello, Paul.

On Mon, Sep 30, 2013 at 09:23:53AM +0200, Paul Pogonyshev wrote:
> Sorry, it doesn't apply.

I don't understand what's gone wrong here. =C2=A0Anyway, I= 9;ve just committed
that patch to the Emacs trunk (revision #114650). =C2=A0Perhaps you could t= ry
out this latest fix too, and let me know if there are any more problems
in this area. =C2=A0Thanks!

> Paul

--
Alan Mackenzie (Nuremberg, Germany).


> On 29 September 2013 17:03, Alan Macken= zie <acm@muc.de> wrote:
>
> > On Sat, Sep 28, 201= 3 at 09:15:52PM +0200, Paul Pogonyshev wrote:
> > > > I've committed a fix, revision #114474, to the bzr = trunk. =C2=A0Could
> > > > you try out the change, please, and either confirm it f= ixes the
> > > > bug properly, or tell me what hasn't yet been fixed= .
> >
> > > Thank you. The case I initially mentioned works properly now= , also with
> > > multiple implemented interfaces. However, it seems to not kn= ow about
> > > interfaces with generics:
> >
> > > public enum X implements Y <Z>
> > > {
> > > =C2=A0 =C2=A0 A,
> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 B;
> > > }
> >
> > Here's a better patch than the one from last night, which was=
> > demonstrably buggy. =C2=A0It should apply cleanly to the current = trunk.
> > Please let me know how thoroughly it works.
> >
> >

--089e013c6e4aad8ae204e8aff72e-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 20 10:39:12 2013 Received: (at 15465) by debbugs.gnu.org; 20 Oct 2013 14:39:12 +0000 Received: from localhost ([127.0.0.1]:59234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXu9w-0003Ks-0e for submit@debbugs.gnu.org; Sun, 20 Oct 2013 10:39:12 -0400 Received: from colin.muc.de ([193.149.48.1]:52900 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXu9r-0003Kh-9M for 15465@debbugs.gnu.org; Sun, 20 Oct 2013 10:39:08 -0400 Received: (qmail 20612 invoked by uid 3782); 20 Oct 2013 14:39:05 -0000 Received: from acm.muc.de (pD951BC97.dip0.t-ipconnect.de [217.81.188.151]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 20 Oct 2013 16:39:04 +0200 Received: (qmail 5483 invoked by uid 1000); 20 Oct 2013 14:37:07 -0000 Date: Sun, 20 Oct 2013 14:37:07 +0000 To: Paul Pogonyshev Subject: Re: bug#15465: CC-mode misaligns enums that implement an interface in Java Message-ID: <20131020143707.GB3484@acm.acm> References: <20130928173323.GA11317@acm.acm> <20130929150345.GD3161@acm.acm> <20131013213838.GB2498@acm.acm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 15465 Cc: 15465@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) Hello, Paul. On Mon, Oct 14, 2013 at 11:19:39AM +0200, Paul Pogonyshev wrote: > Um, it seems to be worse than before. I guess your first patch worked > better, at least for my cases. > E.g. now I have: > public enum X implements Y, Z > { > A, > B; > } Ah, yes, comma separated lists. I've committed another fix, revision #114729, that perhaps gets it right now. Would you please do the usual. > On a side note, enum methods (and constructors --- yes, enums can > optionally have those) are fontified as variable names, though that is of > course less important than indentation. It still needs to be fixed. Thanks for the pointer. > Paul -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 07:00:39 2013 Received: (at 15465) by debbugs.gnu.org; 21 Oct 2013 11:00:39 +0000 Received: from localhost ([127.0.0.1]:60118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VYDDy-0000Jy-1G for submit@debbugs.gnu.org; Mon, 21 Oct 2013 07:00:38 -0400 Received: from mail-oa0-f45.google.com ([209.85.219.45]:34613) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VYDDu-0000Ji-TQ for 15465@debbugs.gnu.org; Mon, 21 Oct 2013 07:00:35 -0400 Received: by mail-oa0-f45.google.com with SMTP id i4so4884892oah.18 for <15465@debbugs.gnu.org>; Mon, 21 Oct 2013 04:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Pw7FeZp6oexpoAI2fv4ICt1PmeOKMbEWl80Aq6orDhA=; b=QfVHmujTmaNYurDXMKhxE7AkS532J9DYQiATr0I1goCSBThz430r7fn3NdiZOYRyr9 RW+1UZhu3d1+cBR79y47pC1fpYnaVIH5B1P2WcABifUmm3mhvqHBwnQ6opFp8mf2cJXG hY0ynp5NjVClPz0hDnescyT5mSj6aQ3LrPxuNsn4cwIL6nPePQGO/D/ih6ex8XVnApl1 PdhakHgDZRpI7kByNzLB1JBiaoTk37F2w22KkqzMFhfBU+LsXtgcslBdy50dx+oGRpSx h9pFRVTwANnczTA7g5tk2bHDl9DKgGYQZE+cr+vUJwlw5RCtX7DfRPPngRpAVXXO75Za LWGw== MIME-Version: 1.0 X-Received: by 10.60.103.106 with SMTP id fv10mr1166031oeb.44.1382353222711; Mon, 21 Oct 2013 04:00:22 -0700 (PDT) Received: by 10.182.200.163 with HTTP; Mon, 21 Oct 2013 04:00:22 -0700 (PDT) In-Reply-To: <20131020143707.GB3484@acm.acm> References: <20130928173323.GA11317@acm.acm> <20130929150345.GD3161@acm.acm> <20131013213838.GB2498@acm.acm> <20131020143707.GB3484@acm.acm> Date: Mon, 21 Oct 2013 13:00:22 +0200 Message-ID: Subject: Re: bug#15465: CC-mode misaligns enums that implement an interface in Java From: Paul Pogonyshev To: Alan Mackenzie Content-Type: multipart/alternative; boundary=089e012277b4cb3e7a04e93e30a5 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15465 Cc: 15465@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --089e012277b4cb3e7a04e93e30a5 Content-Type: text/plain; charset=UTF-8 Yes, now it works fine on my real code. Thank you. Paul On 20 October 2013 16:37, Alan Mackenzie wrote: > Hello, Paul. > > On Mon, Oct 14, 2013 at 11:19:39AM +0200, Paul Pogonyshev wrote: > > Um, it seems to be worse than before. I guess your first patch worked > > better, at least for my cases. > > > E.g. now I have: > > > public enum X implements Y, Z > > { > > A, > > B; > > } > > Ah, yes, comma separated lists. I've committed another fix, revision > #114729, that perhaps gets it right now. Would you please do the usual. > > > On a side note, enum methods (and constructors --- yes, enums can > > optionally have those) are fontified as variable names, though that is of > > course less important than indentation. > > It still needs to be fixed. Thanks for the pointer. > > > Paul > > -- > Alan Mackenzie (Nuremberg, Germany). > --089e012277b4cb3e7a04e93e30a5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes, now it works fine on my real code. Thank you.
Paul


On 20 October 2013 16:37, Alan Mackenzie <= acm@muc.de> w= rote:
Hello, Paul.

On Mon, Oct 14, 2013 at 11:19:39AM +0200, Paul Pogonyshev wrote:
> Um, it seems to be worse than before. I guess your first patch worked<= br> > better, at least for my cases.

> E.g. now I have:

> public enum X implements Y, Z
> {
> =C2=A0 =C2=A0 A,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 B;
> }

Ah, yes, comma separated lists. =C2=A0I've committed another fix,= revision
#114729, that perhaps gets it right now. =C2=A0Would you please do the usua= l.

> On a side note, enum methods (and constructors --- yes, enums can
> optionally have those) are fontified as variable names, though that is= of
> course less important than indentation.

It still needs to be fixed. =C2=A0Thanks for the pointer.

> Paul

--
Alan Mackenzie (Nuremberg, Germany).

--089e012277b4cb3e7a04e93e30a5-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 21 18:05:02 2013 Received: (at control) by debbugs.gnu.org; 21 Oct 2013 22:05:02 +0000 Received: from localhost ([127.0.0.1]:33526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VYNav-00009d-1l for submit@debbugs.gnu.org; Mon, 21 Oct 2013 18:05:01 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:56225 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VYNas-00009V-KK for control@debbugs.gnu.org; Mon, 21 Oct 2013 18:04:59 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VYNas-00034s-33 for control@debbugs.gnu.org; Mon, 21 Oct 2013 18:04:58 -0400 Date: Mon, 21 Oct 2013 18:04:58 -0400 Message-Id: Subject: control message for bug 15465 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) close 15465 24.4 From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 25 16:31:35 2013 Received: (at 15465-done) by debbugs.gnu.org; 25 Oct 2013 20:31:35 +0000 Received: from localhost ([127.0.0.1]:44041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZo2g-0002zM-MY for submit@debbugs.gnu.org; Fri, 25 Oct 2013 16:31:34 -0400 Received: from colin.muc.de ([193.149.48.1]:60387 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZo2e-0002zD-RY for 15465-done@debbugs.gnu.org; Fri, 25 Oct 2013 16:31:33 -0400 Received: (qmail 5148 invoked by uid 3782); 25 Oct 2013 20:31:31 -0000 Received: from acm.muc.de (p5492CE8A.dip0.t-ipconnect.de [84.146.206.138]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 25 Oct 2013 22:31:30 +0200 Received: (qmail 4047 invoked by uid 1000); 25 Oct 2013 20:29:27 -0000 Date: Fri, 25 Oct 2013 20:29:27 +0000 To: 15465-done@debbugs.gnu.org Subject: Re: bug#15465: CC-mode misaligns enums that implement an interface in Java Message-ID: <20131025202927.GA4034@acm.acm> References: <20130928173323.GA11317@acm.acm> <20130929150345.GD3161@acm.acm> <20131013213838.GB2498@acm.acm> <20131020143707.GB3484@acm.acm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 15465-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) Bug fixed. -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Jun 16 23:46:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 23 Nov 2013 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator