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)
  (dolist (buffer (buffer-list))
    (with-current-buffer buffer
      (when (derived-mode-p '(c-ts-mode c++-ts-mode))
        (setq-local c-ts-mode-indent-style val)
        (c-ts-mode-set-style val)))))