diff options
| author | Yuan Fu | 2023-02-03 18:35:33 -0800 |
|---|---|---|
| committer | Yuan Fu | 2023-02-04 15:33:26 -0800 |
| commit | b80f36b88c76b8f8ce3f2e6f9bd56aa2ccbe7b39 (patch) | |
| tree | 1e4a8f660ce45e3e267778badf76362174f2835c /test | |
| parent | 671e5d9fad5852165f4e63992c91cd6f8c715004 (diff) | |
| download | emacs-b80f36b88c76b8f8ce3f2e6f9bd56aa2ccbe7b39.tar.gz emacs-b80f36b88c76b8f8ce3f2e6f9bd56aa2ccbe7b39.zip | |
Make c-ts-mode-set-style's effect local (bug#61245)
Now c-ts-mode-set-style's effect is local, and there is a new function
c-ts-mode-set-global-style that changes the global setting.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-style-setter): Use c-ts-mode-set-style.
(c-ts-mode-indent-style)
(c-ts-mode--prompt-for-style): Minor change in docstring.
(c-ts-mode-set-global-style): New function (from c-ts-mode-set-style).
(c-ts-mode-set-local-style): Remove function (became c-ts-mode-set-style).
(c-ts-mode-set-style): Renamed from c-ts-mode-set-local-style.
* test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts:
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Use
c-ts-mode-set-style.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts | 2 | ||||
| -rw-r--r-- | test/lisp/progmodes/c-ts-mode-resources/indent.erts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts b/test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts index ba4f854baf8..74e34fe821b 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts | |||
| @@ -3,7 +3,7 @@ Code: | |||
| 3 | (c-ts-mode) | 3 | (c-ts-mode) |
| 4 | (setq-local indent-tabs-mode nil) | 4 | (setq-local indent-tabs-mode nil) |
| 5 | (setq-local c-ts-mode-indent-offset 2) | 5 | (setq-local c-ts-mode-indent-offset 2) |
| 6 | (c-ts-mode-set-local-style 'bsd) | 6 | (c-ts-mode-set-style 'bsd) |
| 7 | (indent-region (point-min) (point-max))) | 7 | (indent-region (point-min) (point-max))) |
| 8 | 8 | ||
| 9 | Point-Char: | | 9 | Point-Char: | |
diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts b/test/lisp/progmodes/c-ts-mode-resources/indent.erts index 058c6e9099c..7dcc3b0fb3a 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts | |||
| @@ -3,7 +3,7 @@ Code: | |||
| 3 | (c-ts-mode) | 3 | (c-ts-mode) |
| 4 | (setq-local indent-tabs-mode nil) | 4 | (setq-local indent-tabs-mode nil) |
| 5 | (setq-local c-ts-mode-indent-offset 2) | 5 | (setq-local c-ts-mode-indent-offset 2) |
| 6 | (c-ts-mode-set-local-style 'gnu) | 6 | (c-ts-mode-set-style 'gnu) |
| 7 | (indent-region (point-min) (point-max))) | 7 | (indent-region (point-min) (point-max))) |
| 8 | 8 | ||
| 9 | Point-Char: | | 9 | Point-Char: | |
| @@ -196,7 +196,7 @@ Code: | |||
| 196 | (c-ts-mode) | 196 | (c-ts-mode) |
| 197 | (setq-local indent-tabs-mode nil) | 197 | (setq-local indent-tabs-mode nil) |
| 198 | (setq-local c-ts-mode-indent-offset 8) | 198 | (setq-local c-ts-mode-indent-offset 8) |
| 199 | (c-ts-mode-set-local-style 'linux) | 199 | (c-ts-mode-set-style 'linux) |
| 200 | (indent-region (point-min) (point-max))) | 200 | (indent-region (point-min) (point-max))) |
| 201 | 201 | ||
| 202 | Name: Labels (Linux Style) | 202 | Name: Labels (Linux Style) |