[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24671: java-mode confused by non-trivial generics
From: |
Alan Mackenzie |
Subject: |
bug#24671: java-mode confused by non-trivial generics |
Date: |
27 Jul 2019 14:14:24 -0000 |
User-agent: |
tin/2.4.2-20171224 ("Lochhead") (UNIX) (FreeBSD/11.2-RELEASE-p9 (amd64)) |
Hello, Lars
In article <mailman.2400.1564236126.2688.bug-gnu-emacs@gnu.org> you wrote:
> Daniel Colascione <dancol@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).