bug#63328: CC Mode 5.35.2 (Java//l); Constructor function not fontified as such

Po Lu via CC-Mode-help <[email protected]> Fri, 12 May 2023 10:42:21 +0800
Newsgroups gmane.emacs.cc-mode.general
Message-ID <[email protected]>
Alan Mackenzie <[email protected]> writes:

> I actually put a class around these lines for testing, as follows:
>
>     class EmacsInputConnection {
>         public
>             EmacsInputConnection (EmacsView view)
>         {
>             super (view, true);
>         }
>     }
>
> ..  I don't think Java classes can have constructors anywhere but inside
> the class of the same name (please correct me if I'm wrong, here).

Sorry for that confusion.

> To fix this reuired some tweaking of the low level syntactic analysis
> code.  Could I ask you, please, to test the enclosed patch (which should
> apply cleanly to either master or the emacs-29 branch).  Then please let
> me know how the test went.
>
> Thanks!

It seems to work, but perhaps it would be safer to change that code only
in Java mode, and not in the rest of the CC modes?