all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#60882: 30.0.50; enabling c-ts-mode in header files
@ 2023-01-17 14:37 Felix
  2023-01-19 21:58 ` Yuan Fu
  0 siblings, 1 reply; 2+ messages in thread
From: Felix @ 2023-01-17 14:37 UTC (permalink / raw)
  To: 60882


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






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#60882: 30.0.50; enabling c-ts-mode in header files
  2023-01-17 14:37 bug#60882: 30.0.50; enabling c-ts-mode in header files Felix
@ 2023-01-19 21:58 ` Yuan Fu
  0 siblings, 0 replies; 2+ messages in thread
From: Yuan Fu @ 2023-01-19 21:58 UTC (permalink / raw)
  To: felix.dick; +Cc: 60882


Felix <felix.dick@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-19 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-17 14:37 bug#60882: 30.0.50; enabling c-ts-mode in header files Felix
2023-01-19 21:58 ` Yuan Fu

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.