From: Yuan Fu Date: Tue, 3 Dec 2024 03:39:10 +0000 (-0800) Subject: ; Use cpp instead of c++ for c-ts-mode--simple-indent-rules X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=305a2818750865586801cbae72ee794a3a0852de;p=emacs.git ; Use cpp instead of c++ for c-ts-mode--simple-indent-rules * lisp/progmodes/c-ts-mode.el (c-ts-mode--simple-indent-rules): Use cpp to be more inline with other functions in c-ts-mode.el. (cherry picked from commit 5d535334f30b874ebb8e2c286c1e059d86ccd41f) --- diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 710160ea472..dec9411b87c 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -441,7 +441,7 @@ NODE and PARENT are the same as other indent rules." "Return the indent rules for MODE and STYLE. The returned value can be set to `treesit-simple-indent-rules'. -MODE can be `c' or `c++'. STYLE can be `gnu', `k&r', `linux', `bsd'." +MODE can be `c' or `cpp'. STYLE can be `gnu', `k&r', `linux', `bsd'." (let ((rules `((c-ts-mode--for-each-tail-body-matcher prev-line c-ts-mode-indent-offset) @@ -513,7 +513,7 @@ MODE can be `c' or `c++'. STYLE can be `gnu', `k&r', `linux', `bsd'." ,@rules)))) (pcase mode ('c `((c . ,rules))) - ('c++ `((cpp . ,rules)))))) + ('cpp `((cpp . ,rules)))))) (defun c-ts-mode--parenthesized-expression-indent-rule (_node parent &rest _) "Indent rule that indents aprenthesized expression. @@ -1451,7 +1451,7 @@ recommended to enable `electric-pair-mode' with this mode." ;; Indent. (setq-local treesit-simple-indent-rules (c-ts-mode--simple-indent-rules - 'c++ c-ts-mode-indent-style)) + 'cpp c-ts-mode-indent-style)) ;; Font-lock. (setq-local treesit-font-lock-settings