Function: c-ts-mode--indent-style-setter
c-ts-mode--indent-style-setter is a byte-compiled function defined in
c-ts-mode.el.gz.
Signature
(c-ts-mode--indent-style-setter SYM VAL)
Documentation
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.
SYM should be c-ts-mode-indent-style, and VAL should be a style
symbol.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/c-ts-mode.el.gz
(defun c-ts-mode--indent-style-setter (sym val)
"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.
SYM should be `c-ts-mode-indent-style', and VAL should be a style
symbol."
(set-default sym val)
(named-let loop ((res nil)
(buffers (buffer-list)))
(if (null buffers)
(mapc (lambda (b)
(with-current-buffer b
(c-ts-mode-set-style val)))
res)
(let ((buffer (car buffers)))
(with-current-buffer buffer
(if (derived-mode-p 'c-ts-mode 'c++-ts-mode)
(loop (append res (list buffer)) (cdr buffers))
(loop res (cdr buffers))))))))