[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60888: 29.0.60; Lost c-or-c++-ts-mode
From: |
Juri Linkov |
Subject: |
bug#60888: 29.0.60; Lost c-or-c++-ts-mode |
Date: |
Fri, 20 Jan 2023 09:57:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
close 60882 29.0.60
close 60888 29.0.60
thanks
>>> I started to rely on c-or-c++-ts-mode because there is no other replacement
>>> to use for such mappings in init files:
>>> (when (and (treesit-ready-p 'c t) (treesit-ready-p 'cpp t))
>>> (add-to-list 'major-mode-remap-alist '(c-or-c++-mode .
>>> c-or-c++-ts-mode)))
>>> c-or-c++-mode is activated for all .h files, so there should be the
>>> corresponding
>>> c-or-c++-ts-mode, but it's lost somewhere in emacs-29.
>>
>> Apparently it was decided that it's a new feature, and thus too late
>> for emacs-29.
>
> I added it back. It really is a bug preventing one to use c(++)-ts-mode
> on header files. So this should be fine to add. Plus I mostly just
> copy-pasted from cc-mode. Sorry for the back-and-forth.
Thanks, so now closing.
PS: It's nice that you added such instructions to the commentary and docstrings:
;; (add-to-list 'major-mode-remap-alist '(c-or-c++-mode . c-or-c++-ts-mode))
Maybe it should be sufficient for emacs-29 and better than updating
user's auto-mode-alist automatically.