Variable: csharp-font-lock-extra-types

csharp-font-lock-extra-types is a customizable variable defined in csharp-mode.el.gz.

Value

("[A-Z][A-Za-z0-9_]*")

Documentation

List of extra types (aside from the type keywords) to recognize in C# mode.

Each list item should be a regexp matching a single identifier.

Note that items on this list that don't include any regexp special characters are automatically optimized using regexp-opt, so you should not use regexp-opt explicitly to build regexps here.

On decoration level 3 (and higher, where applicable), a method is used that finds most types and declarations by syntax alone. This variable is still used as a first step, but other types are recognized correctly anyway in most cases. Therefore this variable should be fairly restrictive and not contain patterns that are uncertain.

Note that this variable is only consulted when the major mode is initialized. If you change it later you have to reinitialize CC Mode by doing M-x csharp-mode (csharp-mode).

Despite the name, this variable is not only used for font locking but also elsewhere in CC Mode to tell types from other identifiers.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/csharp-mode.el.gz
(defcustom csharp-font-lock-extra-types
  (list csharp--regex-type-name)
  (c-make-font-lock-extra-types-blurb "C#" "csharp-mode" (concat))
  :type 'c-extra-types-widget
  :group 'c)