GNU bug report logs - #79797
[PATCH] CC Mode : allow white spaces in Java annotation.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: ana@HIDDEN; Keywords: patch; dated Sun, 9 Nov 2025 09:59:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 79797 <at> debbugs.gnu.org:


Received: (at 79797) by debbugs.gnu.org; 25 Nov 2025 20:27:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 15:27:40 2025
Received: from localhost ([127.0.0.1]:42108 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vNzdT-0001r2-Kw
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2025 15:27:40 -0500
Received: from mail-107166.simplelogin.co ([79.135.107.166]:43063)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from
 <sl.lmysyibrgazdkmjzhe3dmmjmeazdanjqgmydixi.mpmp72zrnx4ma@HIDDEN>)
 id 1vNcUh-0001qL-Cn
 for 79797 <at> debbugs.gnu.org; Mon, 24 Nov 2025 14:45:05 -0500
ARC-Seal: i=1; a=rsa-sha256; d=simplelogin.co; s=arc-20230626; t=1764013496;
 cv=none;
 b=HoUq0yv2knNG/S/GUe1Xhta3DzvrNYytQ6H529eGEUbWYmSzTK1HJyjwvuN/LWxx0JdP/mAGFqCCrX5yrqN/T4q91l+dSAYrwMkMrCix7stfgKsRg/Yoa0psZ+TfWXKvzPG0+DMiMrDnLGv665y6zwI8eOmJ8qbXxiYiS3xTapzhV/0mDhN9yIgB0Bmllb1tSOI6FrewMLIr/uv+WwElrjVrEc407yG48rVPH/q5J6QyJyc6cF52M1XSmnJWganX4F2HGQLQPxitnqsFO7VJEtoVSO4B2WK2jP8CXEqbFIUPOQONvlaoptzkgPeYbalGLk2ZBWGpDpIo/wdv4DseOg==
ARC-Message-Signature: i=1; a=rsa-sha256; d=simplelogin.co; s=arc-20230626;
 t=1764013496; c=relaxed/simple;
 bh=yEk8kjAtUrMRK7CjGeXK1FDPUOkUt8eBkZEd3Y/bDTE=;
 h=Date:Subject:In-Reply-To:From:To:Cc:References;
 b=d4pDhWxnA/tf/ZwOgxDfCo5bgxmKvLer8ou38ZFhtODShW+Sg204MbukVy7Hy69Lhi6/SZAfCmdihZLrreW1bw4v7hw111F8zwlqwo4b1kerNqDYLuPjI8YX01qcST4YoX2Je2V0i0Of9nLjUhQK7IlSQe6InbhU8rzekvA6PSC37NdEfgxl8MJH+Sj8MuJM/oNIeGYnRmqBNtgdhBHq3X9zmAS4LJZTlGCa2O70dzs16UDyiFgw0AGkFK3HaX8Gol2gPqYFIyVXqSt8bCjpOdtaxDQRGrR/Cq9io+Wf5EjE+RWEIWbl2WOpBnA9a6xP1VlQr4B4XWCSOdvFJGB8uA==
ARC-Authentication-Results: i=1; mail.protonmail.ch
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kigoth.pink; s=dkim;
 t=1764013496;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=yEk8kjAtUrMRK7CjGeXK1FDPUOkUt8eBkZEd3Y/bDTE=;
 b=iUfqJVg1/NRzDoK4jG9Y3WSVRzRm3DVZYKgMfObllTBFg3iAMmHcIePV4B1vQrhB2yhrKs
 0lXxvLeUScfbjsENumJmyXPAO395hBHeOpYOjbd5e0A0fULYqML1WWQNgmUMJqST1ZMNlL
 XBvOyncWclL2dxYFVPJ7gQ9/oO3YHK0=
Date: Mon, 24 Nov 2025 19:44:50 +0000
Subject: Re: bug#79797: [PATCH] CC Mode : allow white spaces in Java
 annotation.
In-Reply-To: <aSMyUpZNqQGASNSx@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
From: ana@HIDDEN
To: Alan Mackenzie <acm@HIDDEN>
Message-ID: <176401349656.9.3451317163076391020.1025199661@HIDDEN>
References: <xEOLQhYaXr8Big7jc4vgx-_4WuULVDFBFbZvk5ETcsSUqWkY-EtcC7g7pz7e9FoZYgcxa8Jn0QsnA0qfW7YzYb7XB_uXMA4fL4uHQbK5PM4=@kigoth.pink>
 <aR4mp5pY62JWLLfQ@HIDDEN>
 <176374147782.7.8350576033421223151.1019661344@HIDDEN>
 <aSMyUpZNqQGASNSx@HIDDEN>
X-SimpleLogin-Type: Reply
X-SimpleLogin-EmailLog-ID: 1025199661
X-SimpleLogin-Want-Signing: yes
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79797
Cc: 79797 <at> debbugs.gnu.org, eliz@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Heya Alan,

I did not have the time to properly read and understand it all yet, but, fr=
om a quick testing session :
- @ interface takes on annotation face rather than keyword.
- for some reason "public @ interface [A-Z][A-Z0-9]*[a-z][a-z]+ {}" loses f=
ontification.
What I mean is that :=20
"public @ interface test {}" works, "public @ interface TEST {}" works as w=
ell, but, "public @ interface Test {}" loses fontification on "Test" when y=
ou type the s, it seems to apply when you have uppercase or number and then=
 at least 2 lowercase

> This is indeed more complicated to manage. To do it right, we might
> need to amend c-font-lock-declarations to handle it, or build another
> similar function of the same order of magnitude size. I'd rather just
> leave @Name unfontified for now.

Maybe naive, but if the engine can spot the first annotation, why can't we =
call the relevant functions again, inside the (), to spot another annotatio=
n?

> > lisp/progmodes/cc-fonts.el
> > @@ -3060,17 +3060,25 @@ c-font-lock-annotations
> > (while (re-search-forward "@[ \t\n\r\f]*[a-zA-Z0-9_]+" limit t)
> > (when (save-excursion ; Catch @interface.
> > (goto-char (match-beginning 0))
> > - (not (looking-at c-class-key)))
> > - (let ((start (match-beginning 0))
> > - (end (match-end 0)))
> > + (if (looking-at "@[ \t\n\r\f]interface[^a-zA-Z0-9_]")
> > + (let ((start (match-beginning 0))
> > + (end (match-end 0)))
> > + (c-put-font-lock-face start (1- end) 'font-lock-keyword-face)
> > + nil)
> > + t))
> > + (let ((start (match-beginning 0))
> > + (end (match-end 0))
> > + (openParen end))
> > (when
> > (save-excursion
> > (skip-chars-forward " \t\n\r\f" limit)
> > (and (eq (char-after) ?\()
> > + (setq openParen (point))
> > (c-go-list-forward nil limit)
> > (setq end (point))))
> > (goto-char end))
> > - (c-put-font-lock-face start end c-annotation-face))))
> > + (c-put-font-lock-face start (1+ openParen) c-annotation-face)
> > + (c-put-font-lock-face (1- end) end c-annotation-face))))
> > nil)
>=20
> I did look at your patch, but in the end ended up not using it.

Since we aren't gonna fontify the (), it makes sense not to use it.
The only thing we may want to keep is :
 - (not (looking-at c-class-key)))
 + (if (looking-at "@[ \t\n\r\f]interface[^a-zA-Z0-9_]")
That is because in java, c-class-decl-kwds is : '("class" "@interface" "int=
erface"), and @class is not a keyword, unlike @interface

On a side positive note, normal annotation with () do not fontify what's in=
side them, so it works as intended on that part.

I'll take a deeper look at it later this week ^v^





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79797; Package emacs. Full text available.

Message received at 79797 <at> debbugs.gnu.org:


Received: (at 79797) by debbugs.gnu.org; 25 Nov 2025 20:22:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 15:22:27 2025
Received: from localhost ([127.0.0.1]:41916 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vNzYQ-00016x-CF
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2025 15:22:27 -0500
Received: from mail.muc.de ([193.149.48.3]:20871)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1vNCh8-0007tW-HU
 for 79797 <at> debbugs.gnu.org; Sun, 23 Nov 2025 11:12:13 -0500
Received: (qmail 58652 invoked by uid 3782); 23 Nov 2025 17:12:03 +0100
Received: from muc.de (pd953a670.dip0.t-ipconnect.de [217.83.166.112]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Sun, 23 Nov 2025 17:12:03 +0100
Received: (qmail 9674 invoked by uid 1000); 23 Nov 2025 16:12:02 -0000
Date: Sun, 23 Nov 2025 16:12:02 +0000
To: ana@HIDDEN
Subject: Re: bug#79797: [PATCH] CC Mode : allow white spaces in Java
 annotation.
Message-ID: <aSMyUpZNqQGASNSx@HIDDEN>
References: <xEOLQhYaXr8Big7jc4vgx-_4WuULVDFBFbZvk5ETcsSUqWkY-EtcC7g7pz7e9FoZYgcxa8Jn0QsnA0qfW7YzYb7XB_uXMA4fL4uHQbK5PM4=@kigoth.pink>
 <aR4mp5pY62JWLLfQ@HIDDEN>
 <176374147782.7.8350576033421223151.1019661344@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <176374147782.7.8350576033421223151.1019661344@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79797
Cc: 79797 <at> debbugs.gnu.org, acm@HIDDEN, eliz@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Ana.

On Fri, Nov 21, 2025 at 16:11:08 +0000, ana@HIDDEN wrote:
> Heya, 

> On Wednesday, November 19th, 2025 at 21:21, Alan Mackenzie - acm(a)muc.de <acm@HIDDEN> wrote:

> > I've amended the fontification such that the entirety of an annotation
> > gets c-annotation-face. This includes any parenthesis expression
> > following the @annotation. Please tell me what you think of this
> > fontification as a user. I can easily put it back to what it was if it's
> > not optimal.
> > [...]
> > --
> > Alan Mackenzie (Nuremberg, Germany).

> I looked at it and had a few issues :

It did indeed.  It was a poor patch with at least three bugs in it.
Apologies.

> - firstly, it didn't fix the original issue my patch had, i.e, @
> interface wouldn't have the "@ " part be in c-annotation-face; but,
> your code was clear enough for me to add it.

As well as this, in:

    public @ interface RequestForEnhancement {
        int pvalue();
        int lvalue();
        int value();
    }

, RequestForEnhancement needs to keep font-lock-type-face.

I've made some amendments at a fairly deep level of CC Mode so that "@
interface" is handled the same way as "@interface".  There were changes
needed in c-forward-decl-or-cast-1, a function at the core of fontifying
declarations.

> - I think that the content inside of the parenthesis shouldn't take
> c-annotation-face, it makes it harder to break down the logic of the
> code.  Looking at how other do it : godbolt.org and sublime text do
> not give the annotation face for what's inside the ().  They don't
> apply it on the () themselves, but I do think it doesn't look bad
> here, and can help delimiting things.

OK, thinking about it, the inside of parens shouldn't get
c-annotation-face.  It's just too much solid colour for the eyes.  In
the patch below I also haven't applied that face to the parentheses
themselves.  I don't think this is very consistent with the rest of CC
Mode's fontifications.

> I modified the code to only apply the face on the @, the annotation's
> name and the ().

> It's not perfect, as nested annotation are not given the c-annotation-face.

> i.e, take this example from the java doc : 
> @Author(@Name(first = "Joe", last = "Hacker"))

> in my implementation, @Author() is given the correct face, but not @Name(...).

This is indeed more complicated to manage.  To do it right, we might
need to amend c-font-lock-declarations to handle it, or build another
similar function of the same order of magnitude size.  I'd rather just
leave @Name unfontified for now.

> Do you have an idea on how to make it apply inside one another ?

See above.  It's not simple.

> lisp/progmodes/cc-fonts.el
> @@ -3060,17 +3060,25 @@ c-font-lock-annotations
>    (while (re-search-forward "@[ \t\n\r\f]*[a-zA-Z0-9_]+" limit t)
>      (when (save-excursion        ; Catch @interface.
>          (goto-char (match-beginning 0))
> -        (not (looking-at c-class-key)))
> -      (let ((start (match-beginning 0))
> -        (end (match-end 0)))
> +        (if (looking-at "@[ \t\n\r\f]*interface[^a-zA-Z0-9_]")
> +        (let ((start (match-beginning 0))
> +              (end (match-end 0)))
> +          (c-put-font-lock-face start (1- end) 'font-lock-keyword-face)
> +          nil)
> +          t))
> +      (let* ((start (match-beginning 0))
> +         (end (match-end 0))
> +         (openParen end))
>      (when
>          (save-excursion
>            (skip-chars-forward " \t\n\r\f" limit)
>            (and (eq (char-after) ?\()
> +           (setq openParen (point))
>             (c-go-list-forward nil limit)
>             (setq end (point))))
>        (goto-char end))
> -    (c-put-font-lock-face start end c-annotation-face))))
> +    (c-put-font-lock-face start (1+ openParen) c-annotation-face)
> +    (c-put-font-lock-face (1- end) end c-annotation-face))))
>    nil)
 
I did look at your patch, but in the end ended up not using it.

Would you please apply the following patch and tell me how well or badly
it works.  It should be considerably better than the last attempt.  ;-)



diff -r ff81967283a6 cc-defs.el
--- a/cc-defs.el	Fri Sep 19 20:30:07 2025 +0000
+++ b/cc-defs.el	Sun Nov 23 16:01:51 2025 +0000
@@ -2192,20 +2192,24 @@
 		 (syntax-table-p (symbol-value cur-syn-tab-sym)))
 	    (symbol-value cur-syn-tab-sym)
 	  (funcall (c-get-lang-constant 'c-make-mode-syntax-table nil mode))))
-    (let ((liszt (remq nil list)))
-      (cond
-       ((null liszt)
-	(if adorn
-	    "\\(\\`a\\`\\)"
-	  "\\`a\\`"))
-       ((catch 'symbols
-	  (dolist (elt liszt)
-	    (unless (string-match "\\`\\(\\sw\\|\\s_\\)*\\'" elt)
-	      (throw 'symbols nil)))
-	  t)
-	(regexp-opt liszt 'symbols))
-       (adorn (regexp-opt liszt t))
-       (t (regexp-opt liszt))))))
+    (let* ((liszt (remq nil list))
+	   (res
+	    (cond
+	     ((null liszt)
+	      (if adorn
+		  "\\(\\`a\\`\\)"
+		"\\`a\\`"))
+	     ((catch 'symbols
+		(dolist (elt liszt)
+		  (unless (string-match "\\`\\(\\sw\\|\\s_\\)*\\'" elt)
+		    (throw 'symbols nil)))
+		t)
+	      (regexp-opt liszt 'symbols))
+	     (adorn (regexp-opt liszt t))
+	     (t (regexp-opt liszt)))))
+      (if (c-major-mode-is 'java-mode)
+	  (replace-regexp-in-string "@" "@[ \t\n\r\f]*" res)
+	res))))
 
 (put 'c-make-keywords-re 'lisp-indent-function 1)
 
diff -r ff81967283a6 cc-engine.el
--- a/cc-engine.el	Fri Sep 19 20:30:07 2025 +0000
+++ b/cc-engine.el	Sun Nov 23 16:01:51 2025 +0000
@@ -625,6 +625,10 @@
   ;; Return non-nil if the string KEYWORD is a known keyword.  More
   ;; precisely, the value is the symbol for the keyword in
   ;; `c-keywords-obarray'.
+  (if (c-major-mode-is 'java-mode)
+      (setq keyword
+	    (replace-regexp-in-string
+	     "^@[ \t\n\r\f]*" "@" keyword)))
   (intern-soft keyword c-keywords-obarray))
 
 (defsubst c-keyword-member (keyword-sym lang-constant)
@@ -9770,20 +9774,21 @@
 
 (defun c-forward-annotation ()
   ;; Used for Java code only at the moment.  Assumes point is on the @, moves
-  ;; forward an annotation and returns t.  Leaves point unmoved and returns
-  ;; nil if there is no annotation at point.
+  ;; forward an annotation and whitespace, and returns t.  Leaves point
+  ;; unmoved and returns nil if there is no annotation at point.
   (let ((pos (point)))
     (or
      (and (looking-at "@")
 	  (not (looking-at c-keywords-regexp))
-	  (progn (forward-char) t)
-	  (looking-at c-symbol-key)
+	  (progn (forward-char)
+		 (c-forward-syntactic-ws)
+		 (looking-at c-symbol-key))
 	  (progn (goto-char (match-end 0))
 		 (c-forward-syntactic-ws)
-		 t)
-	  (if (looking-at "(")
-	      (c-go-list-forward)
-	    t))
+		 (if (looking-at "(")
+		     (c-go-list-forward)
+		   t))
+	  (progn (c-forward-syntactic-ws) t))
      (progn (goto-char pos) nil))))
 
 (defmacro c-pull-open-brace (ps)
@@ -10767,9 +10772,7 @@
 	  ;; Look for a specifier keyword clause.
 	   ((or (and (looking-at c-make-top-level-key)
 		     (setq make-top t))
-		(looking-at c-prefix-spec-kwds-re)
-		(and (c-major-mode-is 'java-mode)
-		 (looking-at "@[A-Za-z0-9]+")))
+		(looking-at c-prefix-spec-kwds-re))
 	    (save-match-data
 	      (if (looking-at c-typedef-key)
 		  (setq at-typedef (point))))
@@ -10830,6 +10833,9 @@
 			 (eq (char-after) ?{))
 		(setq at-type-decl t)))
 
+	    (if (c-major-mode-is 'java-mode)
+		(while (c-forward-annotation)))
+
 	    (setq backup-at-type at-type
 		  backup-type-start type-start
 		  backup-id-start id-start
diff -r ff81967283a6 cc-fonts.el
--- a/cc-fonts.el	Fri Sep 19 20:30:07 2025 +0000
+++ b/cc-fonts.el	Sun Nov 23 16:01:51 2025 +0000
@@ -2548,8 +2548,7 @@
 		     (if (> (point) limit) (goto-char limit))))))))
 
 	,@(when (c-major-mode-is 'java-mode)
-	    '((eval . (list "\\_<\\(@[a-zA-Z0-9]+\\)\\_>" 1 c-annotation-face))))
-	))
+	    `(c-font-lock-annotations))))
 
 (c-lang-defconst c-matchers-1
   t (c-lang-const c-cpp-matchers))
@@ -3055,6 +3054,29 @@
 (defun java-font-lock-keywords ()
   (c-compose-keywords-list java-font-lock-keywords))
 
+(defun c-font-lock-annotations (limit)
+  ;; Fontify any Java annotations between POINT and LIMIT.
+  ;; Nil is returned.  Point is undefined on exit.
+  ;;
+  ;; This function might do hidden buffer changes.
+  (while
+      (re-search-forward "@[ \t\n\r\f]*[a-zA-Z0-9_]+" limit t)
+    (unless
+	(c-skip-comments-and-strings limit)
+      (let ((start (match-beginning 0))
+	    (end (match-end 0))
+	    pos)
+	(when (save-excursion		; Catch @interface.
+		(goto-char start)
+		(and (not (looking-at c-class-key))
+		     (progn
+		       (goto-char end)
+		       (skip-chars-forward " \t\n\r\f" limit)
+		       (or (not (eq (char-after) ?\())
+			   (setq pos (c-go-list-forward nil limit))))))
+	  (c-put-font-lock-face start end c-annotation-face)
+	  (if pos (goto-char pos))))))
+  nil)
 
 ;;; CORBA IDL.
 


-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79797; Package emacs. Full text available.

Message received at 79797 <at> debbugs.gnu.org:


Received: (at 79797) by debbugs.gnu.org; 25 Nov 2025 20:18:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 15:18:36 2025
Received: from localhost ([127.0.0.1]:41621 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vNzUh-0000VO-0z
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2025 15:18:36 -0500
Received: from mail-107166.simplelogin.co ([79.135.107.166]:37021)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from
 <sl.lmysyibrgaytsnrwgeztinbmeazdanbvg43tcxi.4ikodnhrpwfko@HIDDEN>)
 id 1vMTjK-000697-Ot
 for 79797 <at> debbugs.gnu.org; Fri, 21 Nov 2025 11:11:42 -0500
ARC-Seal: i=1; a=rsa-sha256; d=simplelogin.co; s=arc-20230626; t=1763741478;
 cv=none;
 b=rT5dTB3NCt3K3WPJZXJcEfB/5nNFI2Mk5AzHvA34r4WTEmwvamb2VjmzFU64qADPtVqxPmk2ttPhriykvOpzqPcxiiDOXRKTHLeV2/76BAqSZJR+KqHVeNfBSDdD4OYc9+yZnnh59FvUiqVn7XWvVP5aG2Y6BK25PM9kZXAFN9mgurLLSl1UYgTuhFef6XsmyxqS+qXc/iXN++vzXnQ8EoddGleL/X+sBLzNWgOfAml/expmKfb45XcbWLsz5L99j7vNnJuS6xhS2tGfVOU06SSpumP7AKno5HtP6gYzzHzWSooP3YsFgIlezHxP257X6KKpHao2mGbaISrrC6aG7A==
ARC-Message-Signature: i=1; a=rsa-sha256; d=simplelogin.co; s=arc-20230626;
 t=1763741478; c=relaxed/simple;
 bh=ljRgEgD9DqpUZ2iL7wj+C0avBWXM1/dnqbVpYZTbucE=;
 h=Date:Subject:In-Reply-To:From:To:Cc:References;
 b=CRpFvLslFpHJQSytEAI5BKYV59ItCj8uyqeT84qz5xFmqsbzoR8By+AHPOnHcI5cHtZ0hRRshYR6vu+QkkGQaDi7dHDEP1p+Dn2h3BeVUlH2KXhr+NKP3D9rB/5GsqAMnTSRmfcBfTFBpg51wKhR22Y+HfJvvg2hcyZe9b8V6UwiCyedtOs/Y2j0DPv0GG3vDXSknJ9m+GGclg7XqU4qa+YVMZsWABQJUsASP3IPiklAP55UF/PfwUMU7UN7pPajItH6Zz8qyQAJOBX9mpfXKndmywCxli1FgQZa4BUt9YgEPuKtXvqx/k07VDfUf35VVfs7wfPiAB6Vyf51vTMAaQ==
ARC-Authentication-Results: i=1; mail.protonmail.ch
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kigoth.pink; s=dkim;
 t=1763741478;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=skuo6hOzsooMB2BYtxd7H749kfnyL2CAP9OKbDqMiIQ=;
 b=iaIU7NFsnRrZgKEKGCVfR2k1bQHuF6JPRsOGPmVV9nlJUCcFCvXdfYUBNOz0d9AWJwNE3/
 MQGea5erOby48AFC69FcDwrEEXV0k2oJPchZ0xD8lYsOlDuFW32GBKKjw8Y1uD3YcqJrZ+
 iwM685qj1DbgAheZ3KugP/XBSccxS0E=
Date: Fri, 21 Nov 2025 16:11:08 +0000
Subject: Re: bug#79797: [PATCH] CC Mode : allow white spaces in Java
 annotation.
In-Reply-To: <aR4mp5pY62JWLLfQ@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
From: ana@HIDDEN
To: acm@HIDDEN
Message-ID: <176374147782.7.8350576033421223151.1019661344@HIDDEN>
References: <xEOLQhYaXr8Big7jc4vgx-_4WuULVDFBFbZvk5ETcsSUqWkY-EtcC7g7pz7e9FoZYgcxa8Jn0QsnA0qfW7YzYb7XB_uXMA4fL4uHQbK5PM4=@kigoth.pink>
 <aR4mp5pY62JWLLfQ@HIDDEN>
X-SimpleLogin-Type: Reply
X-SimpleLogin-EmailLog-ID: 1019661344
X-SimpleLogin-Want-Signing: yes
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79797
Cc: 79797 <at> debbugs.gnu.org, eliz@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Heya,=20

On Wednesday, November 19th, 2025 at 21:21, Alan Mackenzie - acm(a)muc.de <=
acm@HIDDEN> wrote:

> I've amended the fontification such that the entirety of an annotation
> gets c-annotation-face. This includes any parenthesis expression
> following the @annotation. Please tell me what you think of this
> fontification as a user. I can easily put it back to what it was if it's
> not optimal.
> [...]
> --
> Alan Mackenzie (Nuremberg, Germany).

I looked at it and had a few issues :
- firstly, it didn't fix the original issue my patch had, i.e, @   interfac=
e wouldn't have the "@ " part be in c-annotation-face; but, your code was c=
lear enough for me to add it.
- I think that the content inside of the parenthesis shouldn't take c-annot=
ation-face, it makes it harder to break down the logic of the code.
Looking at how other do it : godbolt.org and sublime text do not give the a=
nnotation face for what's inside the ().
They don't apply it on the () themselves, but I do think it doesn't look ba=
d here, and can help delimiting things.

I modified the code to only apply the face on the @, the annotation's name =
and the ().

It's not perfect, as nested annotation are not given the c-annotation-face.

i.e, take this example from the java doc :=20
@Author(@Name(first =3D "Joe", last =3D "Hacker"))

in my implementation, @Author() is given the correct face, but not @Name(..=
.).

Do you have an idea on how to make it apply inside one another ?

lisp/progmodes/cc-fonts.el
@@ -3060,17 +3060,25 @@ c-font-lock-annotations
   (while (re-search-forward "@[ \t\n\r\f]*[a-zA-Z0-9_]+" limit t)
     (when (save-excursion        ; Catch @interface.
         (goto-char (match-beginning 0))
-        (not (looking-at c-class-key)))
-      (let ((start (match-beginning 0))
-        (end (match-end 0)))
+        (if (looking-at "@[ \t\n\r\f]*interface[^a-zA-Z0-9_]")
+        (let ((start (match-beginning 0))
+              (end (match-end 0)))
+          (c-put-font-lock-face start (1- end) 'font-lock-keyword-face)
+          nil)
+          t))
+      (let* ((start (match-beginning 0))
+         (end (match-end 0))
+         (openParen end))
     (when
         (save-excursion
           (skip-chars-forward " \t\n\r\f" limit)
           (and (eq (char-after) ?\()
+           (setq openParen (point))
            (c-go-list-forward nil limit)
            (setq end (point))))
       (goto-char end))
-    (c-put-font-lock-face start end c-annotation-face))))
+    (c-put-font-lock-face start (1+ openParen) c-annotation-face)
+    (c-put-font-lock-face (1- end) end c-annotation-face))))
   nil)
=20
 ;;; CORBA IDL.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79797; Package emacs. Full text available.

Message received at 79797 <at> debbugs.gnu.org:


Received: (at 79797) by debbugs.gnu.org; 19 Nov 2025 20:21:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 19 15:21:09 2025
Received: from localhost ([127.0.0.1]:40611 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vLofs-0001da-W4
	for submit <at> debbugs.gnu.org; Wed, 19 Nov 2025 15:21:09 -0500
Received: from mail.muc.de ([193.149.48.3]:44276)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1vLofq-0001cR-62
 for 79797 <at> debbugs.gnu.org; Wed, 19 Nov 2025 15:21:07 -0500
Received: (qmail 27519 invoked by uid 3782); 19 Nov 2025 21:20:59 +0100
Received: from muc.de (pd953a66b.dip0.t-ipconnect.de [217.83.166.107]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Wed, 19 Nov 2025 21:20:59 +0100
Received: (qmail 8970 invoked by uid 1000); 19 Nov 2025 20:20:55 -0000
Date: Wed, 19 Nov 2025 20:20:55 +0000
To: ana@HIDDEN
Subject: Re: bug#79797: [PATCH] CC Mode : allow white spaces in Java
 annotation.
Message-ID: <aR4mp5pY62JWLLfQ@HIDDEN>
References: <xEOLQhYaXr8Big7jc4vgx-_4WuULVDFBFbZvk5ETcsSUqWkY-EtcC7g7pz7e9FoZYgcxa8Jn0QsnA0qfW7YzYb7XB_uXMA4fL4uHQbK5PM4=@kigoth.pink>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <xEOLQhYaXr8Big7jc4vgx-_4WuULVDFBFbZvk5ETcsSUqWkY-EtcC7g7pz7e9FoZYgcxa8Jn0QsnA0qfW7YzYb7XB_uXMA4fL4uHQbK5PM4=@kigoth.pink>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79797
Cc: 79797 <at> debbugs.gnu.org, acm@HIDDEN, eliz@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Ana.

Thanks for taking the trouble to report this problem.

On Sun, Nov 09, 2025 at 09:57:35 +0000, ana@HIDDEN wrote:
> Heya, as per the Java language specification, white spaces can be
> inserted inside annotation, right after the '@'.

> This means that '@ Override' should have the '@' and the 'Override' in
> 'c-annotation-face'; this is currently not the case as both take the
> default face instead.

> In Java, a white space matches [ \t\f\n\r] or \n\r; but several
> instances were only scanning for [ \t\n\r].

> As such I added the \f that were missing and tried to implement the
> change for annotation.

I've included a proposed patch below for the annotation amendment.  I
haven't yet added the \f changes, which seem less important at the
moment.

> Emphasis on "tried" : While my change works for usual annotations;
> there is a special java construct '@interface' that is both an
> annotation and a class keyword, a bit weird yes, but it means it needs
> to take the same face as 'class' and 'interface' (regular one, which
> isn't the same as '@interface' btw).  They are defined in
> lisp/progmodes/cc-langs.el (c-class-decl-kwds)

I've amended the fontification such that the entirety of an annotation
gets c-annotation-face.  This includes any parenthesis expression
following the @annotation.  Please tell me what you think of this
fontification as a user.  I can easily put it back to what it was if it's
not optimal.

> The following, intuitive, yet incorrect, change makes '@interface' take 'c-annotation-face' rather than the expected 'font-lock-keyword-face' :
> - java '("class" "@interface" "interface")
> + java '("class" "@[ \t\f\n\r]*interface" "interface")

> If anyone has an idea as to how '@interface' could work with my
> proposed changes, do note that in order to verify the change is
> correct, the '@' of '@ interface' also needs to be in
> 'font-lock-keyword-face' rather than default, it's easy to miss because
> 'interface' in itself is a keyword.

Please try out the following patch and tell me how well it works, in
particular with respect to the fontification of the parenthesis
expressions.



diff -r ff81967283a6 cc-engine.el
--- a/cc-engine.el	Fri Sep 19 20:30:07 2025 +0000
+++ b/cc-engine.el	Wed Nov 19 20:18:32 2025 +0000
@@ -9770,20 +9770,23 @@
 
 (defun c-forward-annotation ()
   ;; Used for Java code only at the moment.  Assumes point is on the @, moves
-  ;; forward an annotation and returns t.  Leaves point unmoved and returns
-  ;; nil if there is no annotation at point.
+  ;; forward an annotation and whitespace, and returns t.  Leaves point
+  ;; unmoved and returns nil if there is no annotation at point.
   (let ((pos (point)))
     (or
      (and (looking-at "@")
 	  (not (looking-at c-keywords-regexp))
-	  (progn (forward-char) t)
+	  (progn (forward-char)
+		 (c-forward-syntactic-ws)
+		 t)
 	  (looking-at c-symbol-key)
 	  (progn (goto-char (match-end 0))
 		 (c-forward-syntactic-ws)
 		 t)
-	  (if (looking-at "(")
-	      (c-go-list-forward)
-	    t))
+	  (progn (if (looking-at "(")
+		     (c-go-list-forward))
+		 t)
+	  (progn (c-forward-syntactic-ws) t))
      (progn (goto-char pos) nil))))
 
 (defmacro c-pull-open-brace (ps)
@@ -10767,9 +10770,7 @@
 	  ;; Look for a specifier keyword clause.
 	   ((or (and (looking-at c-make-top-level-key)
 		     (setq make-top t))
-		(looking-at c-prefix-spec-kwds-re)
-		(and (c-major-mode-is 'java-mode)
-		 (looking-at "@[A-Za-z0-9]+")))
+		(looking-at c-prefix-spec-kwds-re))
 	    (save-match-data
 	      (if (looking-at c-typedef-key)
 		  (setq at-typedef (point))))
@@ -10830,6 +10831,9 @@
 			 (eq (char-after) ?{))
 		(setq at-type-decl t)))
 
+	    (if (c-major-mode-is 'java-mode)
+		(while (c-forward-annotation)))
+
 	    (setq backup-at-type at-type
 		  backup-type-start type-start
 		  backup-id-start id-start
diff -r ff81967283a6 cc-fonts.el
--- a/cc-fonts.el	Fri Sep 19 20:30:07 2025 +0000
+++ b/cc-fonts.el	Wed Nov 19 20:18:32 2025 +0000
@@ -2548,8 +2548,7 @@
 		     (if (> (point) limit) (goto-char limit))))))))
 
 	,@(when (c-major-mode-is 'java-mode)
-	    '((eval . (list "\\_<\\(@[a-zA-Z0-9]+\\)\\_>" 1 c-annotation-face))))
-	))
+	    `(c-font-lock-annotations))))
 
 (c-lang-defconst c-matchers-1
   t (c-lang-const c-cpp-matchers))
@@ -3055,6 +3054,26 @@
 (defun java-font-lock-keywords ()
   (c-compose-keywords-list java-font-lock-keywords))
 
+(defun c-font-lock-annotations (limit)
+  ;; Fontify any Java annotations between POINT and LIMIT.
+  ;; Nil is always returned.  Point is undefined on exit.
+  ;;
+  ;; This function might do hidden buffer changes.
+  (while (re-search-forward "@[ \t\n\r\f]*[a-zA-Z0-9_]+" limit t)
+    (when (save-excursion		; Catch @interface.
+	    (goto-char (match-beginning 0))
+	    (not (looking-at c-class-key)))
+      (let ((start (match-beginning 0))
+	    (end (match-end 0)))
+	(when
+	    (save-excursion
+	      (skip-chars-forward " \t\n\r\f" limit)
+	      (and (eq (char-after) ?\()
+		   (c-go-list-forward nil limit)
+		   (setq end (point))))
+	  (goto-char end))
+	(c-put-font-lock-face start end c-annotation-face))))
+  nil)
 
 ;;; CORBA IDL.
 


> Relevant Java doc : 
> - Annotation : https://docs.oracle.com/javase/specs/jls/se25/html/jls-9.html#jls-9.7.1

> - White Space : https://docs.oracle.com/javase/specs/jls/se25/html/jls-3.html#jls-3.6

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79797; Package emacs. Full text available.

Message received at 79797 <at> debbugs.gnu.org:


Received: (at 79797) by debbugs.gnu.org; 12 Nov 2025 19:38:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 12 14:38:17 2025
Received: from localhost ([127.0.0.1]:51048 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vJGfY-0005zY-Kr
	for submit <at> debbugs.gnu.org; Wed, 12 Nov 2025 14:38:17 -0500
Received: from mail.muc.de ([193.149.48.3]:41135)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1vJGfW-0005zH-0p
 for 79797 <at> debbugs.gnu.org; Wed, 12 Nov 2025 14:38:14 -0500
Received: (qmail 55930 invoked by uid 3782); 12 Nov 2025 20:38:07 +0100
Received: from muc.de (p4fe15298.dip0.t-ipconnect.de [79.225.82.152]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Wed, 12 Nov 2025 20:38:07 +0100
Received: (qmail 27647 invoked by uid 1000); 12 Nov 2025 19:38:06 -0000
Date: Wed, 12 Nov 2025 19:38:06 +0000
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#79797: [PATCH] CC Mode : allow white spaces in Java
 annotation.
Message-ID: <aRTiHi8_LcaVGo_4@HIDDEN>
References: <xEOLQhYaXr8Big7jc4vgx-_4WuULVDFBFbZvk5ETcsSUqWkY-EtcC7g7pz7e9FoZYgcxa8Jn0QsnA0qfW7YzYb7XB_uXMA4fL4uHQbK5PM4=@kigoth.pink>
 <86y0of4i4u.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <86y0of4i4u.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79797
Cc: 79797 <at> debbugs.gnu.org, ana@HIDDEN, acm@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Ana and Eli.

On Sun, Nov 09, 2025 at 12:25:53 +0200, Eli Zaretskii wrote:
> > Date: Sun, 09 Nov 2025 09:57:35 +0000
> > From: ana--- via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>

> > Heya, as per the Java language specification, white spaces can be inserted inside annotation, right after the '@'.

> > This means that '@ Override' should have the '@' and the 'Override' in 'c-annotation-face'; this is currently not the case as both take the default face instead.

This is surprisingly awkward to fix.  It changes @annotation, mistakenly
a token, to @ annotation, an expression.  Or something like that.

> > In Java, a white space matches [ \t\f\n\r] or \n\r; but several 
> > instances were only scanning for [ \t\n\r].

OK, that's likely the case for several CC Mode major modes.

> > As such I added the \f that were missing and tried to implement the change for annotation.

> > Emphasis on "tried" : While my change works for usual annotations; there is a special java construct '@interface' that is both an annotation and a class keyword, a bit weird yes, but it means it needs to take the same face as 'class' and 'interface' (regular one, which isn't the same as '@interface' btw).
> > They are defined in lisp/progmodes/cc-langs.el (c-class-decl-kwds)

Yes.

> > The following, intuitive, yet incorrect, change makes '@interface' take 'c-annotation-face' rather than the expected 'font-lock-keyword-face' :
> > - java '("class" "@interface" "interface")
> > + java '("class" "@[ \t\f\n\r]*interface" "interface")

> > If anyone has an idea as to how '@interface' could work with my
> > proposed changes, do note that in order to verify the change is
> > correct, the '@' of '@ interface' also needs to be in
> > 'font-lock-keyword-face' rather than default, it's easy to miss
> > because 'interface' in itself is a keyword.

I'll work out a way of doing this.  But I'm very busy with Real Life for
the next few days.  I'll get around to it next week.

> > Relevant Java doc : 
> > - Annotation : https://docs.oracle.com/javase/specs/jls/se25/html/jls-9.html#jls-9.7.1

> > - White Space : https://docs.oracle.com/javase/specs/jls/se25/html/jls-3.html#jls-3.6

> Thanks, I've CC'ed Alan who maintains the Java mode.

Thanks, Eli!

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79797; Package emacs. Full text available.

Message received at 79797 <at> debbugs.gnu.org:


Received: (at 79797) by debbugs.gnu.org; 9 Nov 2025 10:26:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 09 05:26:07 2025
Received: from localhost ([127.0.0.1]:58086 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vI2cZ-0003EA-AD
	for submit <at> debbugs.gnu.org; Sun, 09 Nov 2025 05:26:07 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:51382)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vI2cX-0003Dl-74
 for 79797 <at> debbugs.gnu.org; Sun, 09 Nov 2025 05:26:05 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1vI2cR-0003bz-67; Sun, 09 Nov 2025 05:25:59 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=t6Tn8/2Vza9srt4sP6QkfOkEN9Yp7sofwZT76u4NXnw=; b=aOqhgsr4Z6DY
 GdcBXsVh1+4lT9f1oIx6qxbi2Ma4OCFwSQS/D8EWECQJY1p3JH5NK2BmSzrX5HjFw8nwBH1qzJZwA
 EhaBBXYQDqFjzDzNEIJkIezjl/5P26Z5D2lbdEVuD+rXQ/kCSv3xjtdasaJP5XphZcAjufqKtJXyk
 Q3QprqJovH1UFjtk0ZvckXLBqXvSZ7dbEXg3VxzfXYQVE5+TerN1GjCn45ZhfPvyOUVfixL6kgQ4T
 sOzwEyaWHX4rD43JOikcgnvoMWyA6nm4ldG76rgPdCbovt5gJR/2K/WjDGI/lXfH4XurH7m91EUoe
 6LseqH9I6axRYun1POgiCQ==;
Date: Sun, 09 Nov 2025 12:25:53 +0200
Message-Id: <86y0of4i4u.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: ana@HIDDEN, Alan Mackenzie <acm@HIDDEN>
In-Reply-To: <xEOLQhYaXr8Big7jc4vgx-_4WuULVDFBFbZvk5ETcsSUqWkY-EtcC7g7pz7e9FoZYgcxa8Jn0QsnA0qfW7YzYb7XB_uXMA4fL4uHQbK5PM4=@kigoth.pink>
 (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#79797: [PATCH] CC Mode : allow white spaces in Java
 annotation.
References: <xEOLQhYaXr8Big7jc4vgx-_4WuULVDFBFbZvk5ETcsSUqWkY-EtcC7g7pz7e9FoZYgcxa8Jn0QsnA0qfW7YzYb7XB_uXMA4fL4uHQbK5PM4=@kigoth.pink>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79797
Cc: 79797 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 09 Nov 2025 09:57:35 +0000
> From: ana--- via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> Heya, as per the Java language specification, white spaces can be inserted inside annotation, right after the '@'.
> 
> This means that '@ Override' should have the '@' and the 'Override' in 'c-annotation-face'; this is currently not the case as both take the default face instead.
> 
> In Java, a white space matches [ \t\f\n\r] or \n\r; but several 
> instances were only scanning for [ \t\n\r].
> 
> As such I added the \f that were missing and tried to implement the change for annotation.
> 
> Emphasis on "tried" : While my change works for usual annotations; there is a special java construct '@interface' that is both an annotation and a class keyword, a bit weird yes, but it means it needs to take the same face as 'class' and 'interface' (regular one, which isn't the same as '@interface' btw).
> They are defined in lisp/progmodes/cc-langs.el (c-class-decl-kwds)
> 
> The following, intuitive, yet incorrect, change makes '@interface' take 'c-annotation-face' rather than the expected 'font-lock-keyword-face' :
> - java '("class" "@interface" "interface")
> + java '("class" "@[ \t\f\n\r]*interface" "interface")
> 
> If anyone has an idea as to how '@interface' could work with my proposed changes, do note that in order to verify the change is correct, the '@' of '@ interface' also needs to be in 'font-lock-keyword-face' rather than default, it's easy to miss because 'interface' in itself is a keyword.
> 
> Relevant Java doc : 
> - Annotation : https://docs.oracle.com/javase/specs/jls/se25/html/jls-9.html#jls-9.7.1
> 
> - White Space : https://docs.oracle.com/javase/specs/jls/se25/html/jls-3.html#jls-3.6

Thanks, I've CC'ed Alan who maintains the Java mode.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79797; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 Nov 2025 09:58:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 09 04:58:06 2025
Received: from localhost ([127.0.0.1]:57927 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vI2BR-0002G6-RG
	for submit <at> debbugs.gnu.org; Sun, 09 Nov 2025 04:58:06 -0500
Received: from lists.gnu.org ([2001:470:142::17]:41716)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ana@HIDDEN>) id 1vI2BO-0002FZ-Rd
 for submit <at> debbugs.gnu.org; Sun, 09 Nov 2025 04:58:03 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ana@HIDDEN>) id 1vI2BB-0006C6-VM
 for bug-gnu-emacs@HIDDEN; Sun, 09 Nov 2025 04:57:51 -0500
Received: from mail-05.mail-europe.com ([85.9.206.169])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ana@HIDDEN>) id 1vI2B9-0003w4-9S
 for bug-gnu-emacs@HIDDEN; Sun, 09 Nov 2025 04:57:49 -0500
Date: Sun, 09 Nov 2025 09:57:35 +0000
To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN>
From: ana@HIDDEN
Subject: [PATCH] CC Mode : allow white spaces in Java annotation.
Message-ID: <xEOLQhYaXr8Big7jc4vgx-_4WuULVDFBFbZvk5ETcsSUqWkY-EtcC7g7pz7e9FoZYgcxa8Jn0QsnA0qfW7YzYb7XB_uXMA4fL4uHQbK5PM4=@kigoth.pink>
Feedback-ID: 96884362:user:proton
X-Pm-Message-ID: 1c3892fe4b2d93d2e5e3596f2dc716474094ef2c
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="b1=_mOzbjoRzZKtcCNnTjj5ObdpwausNIJ6EpQDG6hCbI"
Received-SPF: pass client-ip=85.9.206.169; envelope-from=ana@HIDDEN;
 helo=mail-05.mail-europe.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--b1=_mOzbjoRzZKtcCNnTjj5ObdpwausNIJ6EpQDG6hCbI
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Heya, as per the Java language specification, white spaces can be inserted =
inside annotation, right after the '@'.

This means that '@ Override' should have the '@' and the 'Override' in 'c-a=
nnotation-face'; this is currently not the case as both take the default fa=
ce instead.

In Java, a white space matches [ \t\f\n\r] or \n\r; but several=20
instances were only scanning for [ \t\n\r].

As such I added the \f that were missing and tried to implement the change =
for annotation.

Emphasis on "tried" : While my change works for usual annotations; there is=
 a special java construct '@interface' that is both an annotation and a cla=
ss keyword, a bit weird yes, but it means it needs to take the same face as=
 'class' and 'interface' (regular one, which isn't the same as '@interface'=
 btw).
They are defined in lisp/progmodes/cc-langs.el (c-class-decl-kwds)

The following, intuitive, yet incorrect, change makes '@interface' take 'c-=
annotation-face' rather than the expected 'font-lock-keyword-face' :
- java '("class" "@interface" "interface")
+ java '("class" "@[ \t\f\n\r]*interface" "interface")

If anyone has an idea as to how '@interface' could work with my proposed ch=
anges, do note that in order to verify the change is correct, the '@' of '@=
 interface' also needs to be in 'font-lock-keyword-face' rather than defaul=
t, it's easy to miss because 'interface' in itself is a keyword.

Relevant Java doc :=20
- Annotation : https://docs.oracle.com/javase/specs/jls/se25/html/jls-9.htm=
l#jls-9.7.1

- White Space : https://docs.oracle.com/javase/specs/jls/se25/html/jls-3.ht=
ml#jls-3.6
--b1=_mOzbjoRzZKtcCNnTjj5ObdpwausNIJ6EpQDG6hCbI
Content-Type: text/x-patch; name=0001-CC-Mode-allow-white-spaces-in-Java-annotation.patch
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=0001-CC-Mode-allow-white-spaces-in-Java-annotation.patch

RnJvbSA5ZjY0NzQ0ZWEwM2U5NTg4YmEzOTA0NTNlZjEyMDY3NzMxYzAzMDg4IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBBbmEgPGFuYUBraWdvdGgucGluaz4KRGF0ZTogU3VuLCA5IE5v
diAyMDI1IDEwOjA2OjAzICswMTAwClN1YmplY3Q6IFtQQVRDSF0gQ0MgTW9kZSA6IGFsbG93IHdo
aXRlIHNwYWNlcyBpbiBKYXZhIGFubm90YXRpb24uCgoqIGxpc3AvcHJvZ21vZGVzL2NjLWVuZ2lu
ZS5lbCAoYy1mb3J3YXJkLWRlY2wtb3ItY2FzdC0xKQpsaXNwL3Byb2dtb2Rlcy9jYy1mb250cy5l
bCAoYy1iYXNpYy1tYXRjaGVycy1hZnRlcikKbGlzcC9wcm9nbW9kZXMvY2MtbGFuZ3MuZWwgKGMt
YW5ub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GZcblxyXSoiCiAgICAgICAgOzsgQW4gYXJndW1lbnQgbGlzdCB0aGF0IGNvbnRhaW5z
IHplcm8gb3IgbW9yZSBhcmd1bWVudHMuCiAgICAgICAgKGNvbmNhdAogCSIoIgotCSJbIFx0XG5c
cl0qIgorCSJbIFx0XGZcblxyXSoiCiAJIlxcKCIKLQkgICJcXCgiIGNjLWltZW51LWphdmEtbWV0
aG9kLWFyZy1yZWdleHAgIixbIFx0XG5ccl0qXFwpKiIKKwkgICJcXCgiIGNjLWltZW51LWphdmEt
bWV0aG9kLWFyZy1yZWdleHAgIixbIFx0XGZcblxyXSpcXCkqIgogCSAgY2MtaW1lbnUtamF2YS1t
ZXRob2QtYXJnLXJlZ2V4cAogCSJcXCk/IgogCSIpIgotCSJbLixfIiBjLWFsbnVtICIgXHRcblxy
XSoiCSAgICAgIDsgdGhyb3dzIGV0Yy4KKwkiWy4sXyIgYy1hbG51bSAiIFx0XGZcblxyXSoiCSAg
ICAgIDsgdGhyb3dzIGV0Yy4KIAkieyIKIAkpKSA3KSkKICAgIkltZW51IGdlbmVyaWMgZXhwcmVz
c2lvbiBmb3IgSmF2YSBtb2RlLiAgU2VlIGBpbWVudS1nZW5lcmljLWV4cHJlc3Npb24nLiIpCi0t
IAoyLjUxLjAKCg==

--b1=_mOzbjoRzZKtcCNnTjj5ObdpwausNIJ6EpQDG6hCbI--





Acknowledgement sent to ana@HIDDEN:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#79797; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 25 Nov 2025 20:30:02 UTC

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