From 508389ad2bb3e33269a66f2fcb020839b5a9a132 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Sat, 7 Jan 2023 16:32:46 -0800 Subject: [PATCH] Add documentation for c/c++-ts-mode (bug#60443) Explain that tree-sitter c modes and cc-mode c modes don't share config variables. * lisp/progmodes/c-ts-mode.el (c-ts-mode) (c++-ts-mode): Update docstring. --- lisp/progmodes/c-ts-mode.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index a35a0f12f51..ae50c0ef991 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -798,7 +798,11 @@ Set up: ;;;###autoload (define-derived-mode c-ts-mode c-ts-base-mode "C" - "Major mode for editing C, powered by tree-sitter." + "Major mode for editing C, powered by tree-sitter. + +This mode is independent from the classic cc-mode.el based +`c-mode', so configuration variables of that mode, like +`c-basic-offset', don't affect this mode." :group 'c (unless (treesit-ready-p 'c) @@ -820,7 +824,11 @@ Set up: ;;;###autoload (define-derived-mode c++-ts-mode c-ts-base-mode "C++" - "Major mode for editing C++, powered by tree-sitter." + "Major mode for editing C++, powered by tree-sitter. + +This mode is independent from the classic cc-mode.el based +`c++-mode', so configuration variables of that mode, like +`c-basic-offset', don't affect this mode." :group 'c++ (unless (treesit-ready-p 'cpp) -- 2.39.2