Subject: bug#72388: 31.0.50; Use tree-sitter-cuda grammar but with tree-sitter-cpp's font-lock/indentation rules

From: Yuan Fu <[email-masked]>
Date: Tue, 30 Jul 2024 17:05:48 -0700

Originated from "Implementing cuda-ts-mode” on emacs-devel [1]. Basically we want to create a major mode for tree-sitter-cuda. Tree-sitter-cuda grammar is basically cpp grammar plus some cuda rules. So it makes sense to reuse cpp mode’s font-lock/indentation rules. But those rules directs to the ‘cpp grammar. A simple solution is to allow users to map one language to another; then when ever lisp tries to create or get a parser for lang A, lang B is used.

Yuan

[1] Message-ID: <v2a2js5ssoz7d3hquenaieubgmj263tz3ejbogordd5t3ys4v2@efpjojlxrlv4>