diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2024-04-01 18:50:20 +0800 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2024-04-01 18:50:20 +0800 |
commit | 0fef2018445b257bf26814e6659bc2ff5b270d77 (patch) | |
tree | 2310ce1fd8781a6203ec56e2f985f6adfcc2278d /lisp/progmodes/c-ts-common.el | |
parent | 3a8546615a38337dc991f6546ade63a372edc2ca (diff) | |
parent | 49f76dcc17055e60569b6096e8ea3c9961ebbf63 (diff) | |
download | emacs-0fef2018445b257bf26814e6659bc2ff5b270d77.tar.gz |
Merge branch 'athena/unstable' into athena/bookworm-backports
Diffstat (limited to 'lisp/progmodes/c-ts-common.el')
-rw-r--r-- | lisp/progmodes/c-ts-common.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el index 07161025d5d..e48bcc64f14 100644 --- a/lisp/progmodes/c-ts-common.el +++ b/lisp/progmodes/c-ts-common.el @@ -37,9 +37,8 @@ ;; ;; For indenting statements: ;; -;; - Set `c-ts-common-indent-offset', -;; `c-ts-common-indent-block-type-regexp', and -;; `c-ts-common-indent-bracketless-type-regexp', then use simple-indent +;; - Set `c-ts-common-indent-offset', and +;; `c-ts-common-indent-type-regexp-alist', then use simple-indent ;; offset `c-ts-common-statement-offset' in ;; `treesit-simple-indent-rules'. @@ -331,9 +330,9 @@ If NODE is nil, return nil." Assumes the anchor is (point-min), i.e., the 0th column. This function basically counts the number of block nodes (i.e., -brackets) (defined by `c-ts-common-indent-block-type-regexp') +brackets) (see `c-ts-common-indent-type-regexp-alist') between NODE and the root node (not counting NODE itself), and -multiply that by `c-ts-common-indent-offset'. +multiplies that by `c-ts-common-indent-offset'. To support GNU style, on each block level, this function also checks whether the opening bracket { is on its own line, if so, |