GNU bug report logs -
#79625
30.1; java-ts-mode: field_access uses font-lock-type-face
Previous Next
To reply to this bug, email your comments to 79625 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79625; Package
emacs.
(Tue, 14 Oct 2025 18:24:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Robert Brown <robert.brown <at> gmail.com>:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org.
(Tue, 14 Oct 2025 18:24:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
When fontifying the following Java code:
package mystuff;
import static foo.bar.Struct;
class MyClass {
void set_bar(Struct foo) {
foo.bar = 100;
}
}
java-ts-mode fontifies the "foo" prefix of "foo.bar" using
font-lock-type-face.
In comparison, java-mode uses the default face. I believe java-ts-mode
should
also use the default face.
In GNU Emacs 30.1 (build 4, x86_64-pc-linux-gnu) of 2025-02-23 built on
chuwi
System Description: Ubuntu 24.04.3 LTS
Configured using:
'configure --without-x
--prefix=/home/brown/local/software/package/emacs-30.1'
Configured features:
DBUS GMP GNUTLS LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER SECCOMP SOUND THREADS TREE_SITTER XIM ZLIB
Important settings:
value of $LC_COLLATE: C
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Completion List
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
buffer-read-only: t
line-number-mode: t
cursor-face-highlight-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
/home/brown/local/software/source/slime/slime-tests hides
/home/brown/.emacs.d/elpa/slime-20240323.141/slime-tests
/home/brown/local/software/source/slime/slime-autoloads hides
/home/brown/.emacs.d/elpa/slime-20240323.141/slime-autoloads
/home/brown/local/software/source/slime/slime hides
/home/brown/.emacs.d/elpa/slime-20240323.141/slime
/home/brown/lib/emacs/lisp/yow hides
/home/brown/local/software/package/emacs-30.1/share/emacs/30.1/lisp/obsolete/yow
Features:
(shadow sort mail-extr cl-extra warnings display-line-numbers ebuff-menu
emacsbug message yank-media puny dired dnd dired-loaddefs rfc822 mml
mml-sec epa derived epg rfc6068 epg-config gnus-util
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils mule-util apropos crm thingatpt
help-fns radix-tree help-mode cap-words superword subword cc-mode
cc-fonts cc-guess cc-menus cc-cmds java-ts-mode c-ts-common treesit
term/xterm xterm company-oddmuse company-keywords company-etags etags
fileloop generator xref project ring company-gtags company-dabbrev-code
company-dabbrev company-files company-clang company-capf company-cmake
company-semantic company-template company-bbdb company pcase cc-styles
cc-align cc-engine cc-vars cc-defs regexp-opt rx dash-autoloads
ement-autoloads persist-autoloads plz-autoloads slime-company-autoloads
slime-autoloads macrostep-autoloads svg-lib-autoloads
taxy-magit-section-autoloads taxy-autoloads info tool-bar
magit-section-autoloads llama-autoloads package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs icons password-cache json
subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib
rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify multi-tty
make-network-process native-compile emacs)
Memory information:
((conses 16 155709 250114) (symbols 48 12179 99) (strings 32 41281 14457)
(string-bytes 1 1412937) (vectors 16 18140) (vector-slots 8 213127 63218)
(floats 8 72 88) (intervals 56 827 426) (buffers 992 15))
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79625; Package
emacs.
(Tue, 14 Oct 2025 19:24:05 GMT)
Full text and
rfc822 format available.
Message #8 received at 79625 <at> debbugs.gnu.org (full text, mbox):
> From: Robert Brown <robert.brown <at> gmail.com>
> Date: Tue, 14 Oct 2025 14:23:22 -0400
>
> When fontifying the following Java code:
>
> package mystuff;
> import static foo.bar.Struct;
> class MyClass {
> void set_bar(Struct foo) {
> foo.bar = 100;
> }
> }
>
> java-ts-mode fontifies the "foo" prefix of "foo.bar" using font-lock-type-face.
> In comparison, java-mode uses the default face. I believe java-ts-mode should
> also use the default face.
Thanks, I'm adding the relevant people to the discussion.
Reply sent
to
Yuan Fu <casouri <at> gmail.com>:
You have taken responsibility.
(Mon, 27 Oct 2025 06:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Robert Brown <robert.brown <at> gmail.com>:
bug acknowledged by developer.
(Mon, 27 Oct 2025 06:41:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 79625-done <at> debbugs.gnu.org (full text, mbox):
> On Oct 14, 2025, at 12:22 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> From: Robert Brown <robert.brown <at> gmail.com>
>> Date: Tue, 14 Oct 2025 14:23:22 -0400
>>
>> When fontifying the following Java code:
>>
>> package mystuff;
>> import static foo.bar.Struct;
>> class MyClass {
>> void set_bar(Struct foo) {
>> foo.bar = 100;
>> }
>> }
>>
>> java-ts-mode fontifies the "foo" prefix of "foo.bar" using font-lock-type-face.
>> In comparison, java-mode uses the default face. I believe java-ts-mode should
>> also use the default face.
>
> Thanks, I'm adding the relevant people to the discussion.
I don’t really want to maintain java-ts-mode but oh well :)
It does seem like a bug to me. And the offending rule
(field_access object: (identifier) @font-lock-type-face)
Does feel wrong. But I can’t say for sure. Anyway, I removed the rule and now foo is fortified in default face.
Yuan
This bug report was last modified 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.