emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 5d535334f30 2/4: ; Use cpp instead of c++ for c-ts-mode--simple-i


From: Yuan Fu
Subject: master 5d535334f30 2/4: ; Use cpp instead of c++ for c-ts-mode--simple-indent-rules
Date: Thu, 5 Dec 2024 01:44:39 -0500 (EST)

branch: master
commit 5d535334f30b874ebb8e2c286c1e059d86ccd41f
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    ; 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.
---
 lisp/progmodes/c-ts-mode.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]