Semantic Tag Decoration mode “decorates” each tag based on certain
arbitrary features of that tag. Decorations are specified using the
Toggle Semantic Tag Decoration mode in all Semantic-enabled buffers. With an optional argument arg, enable if arg is positive, and disable otherwise.
The value of this variable is a list of decoration styles for Semantic Tag Decoration mode. Each element in this list should have the form
), where name is a style name (a symbol) and flag is non-
nilif the style is enabled.
The following styles are available:
- Place an overline in front of each long tag (excluding prototypes).
- Highlight class members that are designated as private.
- Highlight class members that are designated as protected.
- Highlight class members that are includes. Clicking on the highlighted include statements opens a context menu for configuring Semantic includes.
To enable or disable specific decorations, use this function:
Prompt for a decoration style, name, and turn it on or off. With prefix argument arg, turn on if positive, otherwise off. Return non-
nilif the decoration style is enabled.
Face for long tags in the
Face for privately-scoped tags in the
Face for protected tags in the
Face for includes that are not in some other state, in the
Face for includes that cannot be found, in the
Face for includes that have not yet been parsed, in the
You can create new types of decorations using the following function:
Define a new decoration style with name. doc is a documentation string describing the decoration style name. It is appended to auto-generated doc strings. An Optional list of flags can also be specified. Flags are:
:enabled<value> - specify the default enabled value for name.
This defines two new overload functions respectively called
NAME-highlight, for which you must provide a default implementation in respectively the functions
NAME-highlight-default. Those functions are passed a tag.
NAME-pmust return non-
nilto indicate that the tag should be decorated by
To put primary decorations on a tag
NAME-highlight, use functions like semantic-set-tag-face, semantic-set-tag-intangible, etc., found in the semantic-decorate library.
To add other kind of decorations on a tag,
NAME-highlightmust use semantic-decorate-tag, and other functions of the semantic decoration api found in this library.