Function: c-make-styles-buffer-local

c-make-styles-buffer-local is a byte-compiled function defined in cc-styles.el.gz.

Signature

(c-make-styles-buffer-local &optional THIS-BUF-ONLY-P)

Documentation

Make all CC Mode style variables buffer local.

If THIS-BUF-ONLY-P is non-nil, the style variables will be made buffer local only in the current buffer. Otherwise they'll be made permanently buffer local in any buffer that changes their values.

The buffer localness of the style variables are normally controlled with the variable c-style-variables-are-local-p, so there's seldom any reason to call this function directly.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-styles.el.gz
(defun c-make-styles-buffer-local (&optional this-buf-only-p)
  "Make all CC Mode style variables buffer local.
If THIS-BUF-ONLY-P is non-nil, the style variables will be made
buffer local only in the current buffer.  Otherwise they'll be made
permanently buffer local in any buffer that changes their values.

The buffer localness of the style variables are normally controlled
with the variable `c-style-variables-are-local-p', so there's seldom
any reason to call this function directly."

  ;; style variables
  (let ((func (if this-buf-only-p
		  'make-local-variable
		'make-variable-buffer-local))
	(varsyms (cons 'c-indentation-style
		       (delq 'c-special-indent-hook
			     (copy-alist c-style-variables)))))
    (mapc func varsyms)
    ;; Hooks must be handled specially
    (if this-buf-only-p
	(if (featurep 'xemacs) (make-local-hook 'c-special-indent-hook))
      (setq c-style-variables-are-local-p t))
    ))