GNU bug report logs - #60882
30.0.50; enabling c-ts-mode in header files

Previous Next

Package: emacs;

Reported by: Felix <felix.dick <at> web.de>

Date: Tue, 17 Jan 2023 14:41:02 UTC

Severity: normal

Found in version 30.0.50

Fixed in version 29.0.60

Done: Juri Linkov <juri <at> linkov.net>

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 60882 in the body.
You can then email your comments to 60882 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#60882; Package emacs. (Tue, 17 Jan 2023 14:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Felix <felix.dick <at> web.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 17 Jan 2023 14:41:02 GMT) Full text and rfc822 format available.

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

From: Felix <felix.dick <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; enabling c-ts-mode in header files
Date: Tue, 17 Jan 2023 15:37:16 +0100
If i follow the steps described in Yuan's tree-sitter starter guide:

(add-to-list 'major-mode-remap-alist
	     '(c-mode . c-ts-mode)
	     '(c++-mode . c++-ts-mode))

c-ts-mode is enabled if i open .c files, but for .h files it's still
c-mode.
I checked this with the -Q command line option.
Thanks


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.36) of 2023-01-17 built on felix-lifebooka531
Repository revision: bb383a54910c3094e5d228e0af62bf70e36203ca
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12201007
System Description: Arch Linux

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --with-modules --without-libotf --without-m17n-flt --without-gconf
 --enable-autodepend --enable-link-time-optimization
 --with-native-compilation=yes --with-xinput2 --with-x-toolkit=gtk3
 --without-xaw3d --without-cairo --with-sound=no --with-xwidgets
 --with-tree-sitter --without-gpm --without-compress-install
 '--program-transform-name=s/\([ec]tags\)/\1.emacs/'
 'CFLAGS=-march=native -mtune=generic -O3 -pipe -fno-plt -fexceptions
 -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
ACL DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2
LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11
XDBE XFT XIM XINPUT2 XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60882; Package emacs. (Thu, 19 Jan 2023 22:00:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: felix.dick <at> web.de
Cc: 60882 <at> debbugs.gnu.org
Subject: Re: bug#60882: 30.0.50; enabling c-ts-mode in header files
Date: Thu, 19 Jan 2023 13:58:45 -0800
Felix <felix.dick <at> web.de> writes:

> If i follow the steps described in Yuan's tree-sitter starter guide:
>
> (add-to-list 'major-mode-remap-alist
> 	     '(c-mode . c-ts-mode)
> 	     '(c++-mode . c++-ts-mode))
>
> c-ts-mode is enabled if i open .c files, but for .h files it's still
> c-mode.
> I checked this with the -Q command line option.
> Thanks

You need to also remap c-or-c++-mode to c-or-c++-ts-mode, which is used
for headers (because C and C++ both can use .h for header files).

Yuan




bug marked as fixed in version 29.0.60, send any further explanations to 60882 <at> debbugs.gnu.org and Felix <felix.dick <at> web.de> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Fri, 20 Jan 2023 08:21: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. (Fri, 17 Feb 2023 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 68 days ago.

Previous Next


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