Function: c-add-type
c-add-type is a byte-compiled function defined in cc-engine.el.gz.
Signature
(c-add-type FROM TO)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
(defun c-add-type (from to)
;; Add the given region as a type in `c-found-types'. If the region
;; doesn't match an existing type but there is a type which is equal
;; to the given one except that the last character is missing, then
;; the shorter type is removed. That's done to avoid adding all
;; prefixes of a type as it's being entered and font locked. This
;; doesn't cover cases like when characters are removed from a type
;; or added in the middle. We'd need the position of point when the
;; font locking is invoked to solve this well.
;;
;; This function might do hidden buffer changes.
(let ((type (c-syntactic-content from to c-recognize-<>-arglists)))
(unless (gethash type c-found-types)
(remhash (substring type 0 -1) c-found-types)
(puthash type t c-found-types))))