In every mode (i.e. built-in modes and user modes), keywords or expressions can be set off by colors with the following Smac function:
colors text region from positions start to end with the color colorname (see the standard X11 file rgb.txt).
This function can be used with the Smac regexp interface to color strings of your own modes (see color.sc §5.11 page ).
Example:
The colornames and the regular expressions are predefined in the file color.sc for the following modes: C, C++, Latex, Html Perl, Ada, Fortran, shell-script and Edir. The standards Makefile, makefile, and Imakefile can also be colored. You can modify them or add colors for your own mode.
Default key bindings are:
ATTENTION When the current buffer has been modified by many operations, sometimes, colored strings do not match regular expressions nor keywords of the current mode. In this case, re-run color buffer (color region does not resolve the problem).