Function: c-add-class-syntax
c-add-class-syntax is a byte-compiled function defined in
cc-engine.el.gz.
Signature
(c-add-class-syntax SYMBOL CONTAINING-DECL-OPEN CONTAINING-DECL-START CONTAINING-DECL-KWD)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
(defun c-add-class-syntax (symbol
containing-decl-open
containing-decl-start
containing-decl-kwd)
;; The inclass and class-close syntactic symbols are added in
;; several places and some work is needed to fix everything.
;; Therefore it's collected here.
;;
;; This function might do hidden buffer changes.
(goto-char containing-decl-open)
(if (and (eq symbol 'inclass) (= (point) (c-point 'boi)))
(progn
(c-add-syntax symbol containing-decl-open)
containing-decl-open)
(goto-char containing-decl-start)
;; Ought to use `c-add-stmt-syntax' instead of backing up to boi
;; here, but we have to do like this for compatibility.
(back-to-indentation)
(c-add-syntax symbol (point))
(if (and (c-keyword-member containing-decl-kwd
'c-inexpr-class-kwds)
(/= containing-decl-start (c-point 'boi containing-decl-start)))
(c-add-syntax 'inexpr-class))
(point)))