[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 f50cb7d7c4b 2/6: ; Improve docstring of c-ts-mode--indent-style
From: |
Yuan Fu |
Subject: |
emacs-29 f50cb7d7c4b 2/6: ; Improve docstring of c-ts-mode--indent-style-setter |
Date: |
Sun, 29 Jan 2023 03:13:07 -0500 (EST) |
branch: emacs-29
commit f50cb7d7c4b37cd8e4bb1ffa5d3f9273c7e19e10
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
; Improve docstring of c-ts-mode--indent-style-setter
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-style-setter): Improve docstring.
---
lisp/progmodes/c-ts-mode.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index c6eb1afecec..26ad61c975d 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -93,7 +93,9 @@
:group 'c)
(defun c-ts-mode--indent-style-setter (sym val)
- "Custom setter for `c-ts-mode-set-style'."
+ "Custom setter for `c-ts-mode-set-style'.
+Apart from setting the default value of SYM to VAL, also change
+the value of SYM in `c-ts-mode' and `c++-ts-mode' buffers to VAL."
(set-default sym val)
(named-let loop ((res nil)
(buffers (buffer-list)))
@@ -107,6 +109,7 @@
res)
(let ((buffer (car buffers)))
(with-current-buffer buffer
+ ;; FIXME: Should we use `derived-mode-p' here?
(if (or (eq major-mode 'c-ts-mode) (eq major-mode 'c++-ts-mode))
(loop (append res (list buffer)) (cdr buffers))
(loop res (cdr buffers))))))))
- emacs-29 updated (56e8607dc99 -> 1970726e26a), Yuan Fu, 2023/01/29
- emacs-29 4b1714571c8 3/6: ; Fix byte-compile warnings in c-ts-mode.el, Yuan Fu, 2023/01/29
- emacs-29 1970726e26a 6/6: Use treesit-subtree-stat to determine treesit--font-lock-fast-mode, Yuan Fu, 2023/01/29
- emacs-29 f50cb7d7c4b 2/6: ; Improve docstring of c-ts-mode--indent-style-setter,
Yuan Fu <=
- emacs-29 a3003492ace 4/6: Move c-ts-mode--statement-offset to c-ts-common.el, Yuan Fu, 2023/01/29
- emacs-29 1c3ca3bb649 1/6: Fix <> syntax in rust-ts-mode, Yuan Fu, 2023/01/29
- emacs-29 382e018856a 5/6: Add treesit-subtree-stat, Yuan Fu, 2023/01/29