[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default
From: |
Stefan Monnier |
Subject: |
bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes |
Date: |
Sun, 17 Nov 2024 17:19:28 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
So, for `emacs-30` I propose the patch below.
Any objection?
Stefan
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 2785e9a6e68..af23cd66d98 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -35,12 +35,6 @@
;; To use these modes by default, assuming you have the respective
;; tree-sitter grammars available, do one of the following:
;;
-;; - If you have both C and C++ grammars installed, add
-;;
-;; (require 'c-ts-mode)
-;;
-;; to your init file.
-;;
;; - Add one or mode of the following to your init file:
;;
;; (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode))
@@ -59,6 +53,12 @@
;;
;; will turn on the c++-ts-mode for C++ source files.
;;
+;; - If you have both C and C++ grammars installed, add
+;;
+;; (require 'c-ts-mode)
+;;
+;; to your init file.
+;;
;; You can also turn on these modes manually in a buffer. Doing so
;; will set up Emacs to use the C/C++ modes defined here for other
;; files, provided that you have the corresponding parser grammar
@@ -1496,7 +1496,6 @@ c-or-c++-ts-mode
'(c++-mode . c++-ts-mode)))
(when (treesit-ready-p 'c)
- (add-to-list 'major-mode-remap-defaults '(c++-mode . c++-ts-mode))
(add-to-list 'major-mode-remap-defaults '(c-mode . c-ts-mode)))
(when (and (treesit-ready-p 'cpp)
- bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes, Stefan Monnier, 2024/11/15
- bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes, Stefan Kangas, 2024/11/15
- bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes, Eli Zaretskii, 2024/11/16
- bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes, Stefan Monnier, 2024/11/16
- bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes, Eli Zaretskii, 2024/11/16
- bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes, Stefan Monnier, 2024/11/16
- bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes, Eli Zaretskii, 2024/11/16
- bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes,
Stefan Monnier <=
- bug#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes, Eli Zaretskii, 2024/11/18