GNU bug report logs - #24671
java-mode confused by non-trivial generics

Previous Next

Package: emacs;

Reported by: Daniel Colascione <dancol <at> dancol.org>

Date: Wed, 12 Oct 2016 00:25:02 UTC

Severity: normal

Tags: fixed

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24671 in the body.
You can then email your comments to 24671 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24671; Package emacs. (Wed, 12 Oct 2016 00:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Colascione <dancol <at> dancol.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 12 Oct 2016 00:25:02 GMT) Full text and rfc822 format available.

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

From: Daniel Colascione <dancol <at> dancol.org>
To: bug-gnu-emacs <at> gnu.org
Subject: java-mode confused by non-trivial generics
Date: Tue, 11 Oct 2016 17:23:56 -0700
For the following code

    class Foo {
        public List<Class<? extends Bar<? extends Qux>>> getBars() {
            return null;
        }
    }

I expect the `<' and `>' to be assigned paren syntax, but they are not. Emacs
is latest master.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24671; Package emacs. (Sat, 27 Jul 2019 14:02:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Daniel Colascione <dancol <at> dancol.org>
Cc: 24671 <at> debbugs.gnu.org
Subject: Re: bug#24671: java-mode confused by non-trivial generics
Date: Sat, 27 Jul 2019 16:01:48 +0200
Daniel Colascione <dancol <at> dancol.org> writes:

> For the following code
>
>     class Foo {
>         public List<Class<? extends Bar<? extends Qux>>> getBars() {
>             return null;
>         }
>     }
>
> I expect the `<' and `>' to be assigned paren syntax, but they are not. Emacs
> is latest master.

When I try this in Emacs 27, the < and > characters are fontied the same
way as the parentheses in the example, so I'm guessing that this has
been fixed and is closing this bug report.  If you're still seeing this
problem, please reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 24671 <at> debbugs.gnu.org and Daniel Colascione <dancol <at> dancol.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 27 Jul 2019 14:02:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24671; Package emacs. (Sat, 27 Jul 2019 15:07:01 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 24671 <at> debbugs.gnu.org, Daniel Colascione <dancol <at> dancol.org>
Subject: Re: bug#24671: java-mode confused by non-trivial generics
Date: 27 Jul 2019 14:14:24 -0000
Hello, Lars

In article <mailman.2400.1564236126.2688.bug-gnu-emacs <at> gnu.org> you wrote:
> Daniel Colascione <dancol <at> dancol.org> writes:

>> For the following code
>>
>>     class Foo {
>>         public List<Class<? extends Bar<? extends Qux>>> getBars() {
>>             return null;
>>         }
>>     }
>>
>> I expect the `<' and `>' to be assigned paren syntax, but they are not. Emacs
>> is latest master.

> When I try this in Emacs 27, the < and > characters are fontied the same
> way as the parentheses in the example, so I'm guessing that this has
> been fixed and is closing this bug report.  If you're still seeing this
> problem, please reopen.

I think the bug should be reopened: it was about the syntax on < and >
rather than the fontification.

If you put point in front of any of the <s, you should be able to
execute C-M-f, moving to the matching >.

This doesn't happen in the current scenario because the closing >s,
written without intervening spaces, get confused with the Java shift
right operator ">>>".  If you insert a space into that triplet, the
syntax comes back again.

This will be easy to fix.

> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

-- 
Alan Mackenzie (Nuremberg, Germany).





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24671; Package emacs. (Sat, 27 Jul 2019 15:12:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 24671 <at> debbugs.gnu.org, Daniel Colascione <dancol <at> dancol.org>
Subject: Re: bug#24671: java-mode confused by non-trivial generics
Date: Sat, 27 Jul 2019 17:11:23 +0200
Alan Mackenzie <acm <at> muc.de> writes:

> I think the bug should be reopened: it was about the syntax on < and >
> rather than the fontification.
>
> If you put point in front of any of the <s, you should be able to
> execute C-M-f, moving to the matching >.

Oh, I see; reopening.

> This doesn't happen in the current scenario because the closing >s,
> written without intervening spaces, get confused with the Java shift
> right operator ">>>".  If you insert a space into that triplet, the
> syntax comes back again.
>
> This will be easy to fix.

I bet.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 27 Jul 2019 15:12:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24671; Package emacs. (Sat, 27 Jul 2019 16:37:02 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 24671 <at> debbugs.gnu.org, Daniel Colascione <dancol <at> dancol.org>
Subject: Re: bug#24671: java-mode confused by non-trivial generics
Date: Sat, 27 Jul 2019 16:36:23 +0000
Hello, Lars and Daniel.

On Sat, Jul 27, 2019 at 17:11:23 +0200, Lars Ingebrigtsen wrote:
> Alan Mackenzie <acm <at> muc.de> writes:

> > I think the bug should be reopened: it was about the syntax on < and >
> > rather than the fontification.

> > If you put point in front of any of the <s, you should be able to
> > execute C-M-f, moving to the matching >.

> Oh, I see; reopening.

> > This doesn't happen in the current scenario because the closing >s,
> > written without intervening spaces, get confused with the Java shift
> > right operator ">>>".  If you insert a space into that triplet, the
> > syntax comes back again.

> > This will be easy to fix.

> I bet.

I've committed a fix to the master branch.  Maybe one or both of you
might want to try it out before the bug is closed.

> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24671; Package emacs. (Sun, 28 Jul 2019 09:44:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 24671 <at> debbugs.gnu.org, Daniel Colascione <dancol <at> dancol.org>
Subject: Re: bug#24671: java-mode confused by non-trivial generics
Date: Sun, 28 Jul 2019 11:43:52 +0200
Alan Mackenzie <acm <at> muc.de> writes:

> I've committed a fix to the master branch.  Maybe one or both of you
> might want to try it out before the bug is closed.

Thanks; I tried it out now, and it seems to work well for me, so I'm
closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 28 Jul 2019 09:45:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 24671 <at> debbugs.gnu.org and Daniel Colascione <dancol <at> dancol.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 28 Jul 2019 09:45:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 25 Aug 2019 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 295 days ago.

Previous Next


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