diff options
author | Yuan Fu <casouri@gmail.com> | 2023-01-28 16:20:29 -0800 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2023-01-29 00:12:56 -0800 |
commit | f50cb7d7c4b37cd8e4bb1ffa5d3f9273c7e19e10 (patch) | |
tree | 806f193f4a7071fd65e2481b55371601e66af686 /lisp/progmodes/c-ts-mode.el | |
parent | 1c3ca3bb649b7e812a84b4a559463462d4357080 (diff) | |
download | emacs-f50cb7d7c4b37cd8e4bb1ffa5d3f9273c7e19e10.tar.gz emacs-f50cb7d7c4b37cd8e4bb1ffa5d3f9273c7e19e10.tar.bz2 emacs-f50cb7d7c4b37cd8e4bb1ffa5d3f9273c7e19e10.zip |
; Improve docstring of c-ts-mode--indent-style-setter
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-style-setter): Improve docstring.
Diffstat (limited to 'lisp/progmodes/c-ts-mode.el')
-rw-r--r-- | lisp/progmodes/c-ts-mode.el | 5 |
1 files changed, 4 insertions, 1 deletions
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)))))))) |