[CMake] New package for advance syntax coloring of CMake scripts in Emacs
Anders Lindgren
andlind at gmail.com
Fri Apr 5 16:25:20 EDT 2013
Hi!
I just uploaded an Emacs package that provides syntax coloring for CMake
scripts in Emacs. It is available at:
https://github.com/Lindydancer/cmake-font-lock
Although the standard package have some syntax coloring support, this
package raises the bar quite a bit. The main new feature is that arguments
are colored according what type they are (the package is aware of all
standard CMake functions, and can easily be extended with other functions).
The following is a list of things that are colored (taken from the
documentation):
* Comments and quoted strings.
* Special functions like `if', `while', `function', and `include' are
colored as font-lock *keywords* (not to be confused with keywords in the
CMake sense).
* Other function name are colored as, well, *functions*.
* The arguments of functions are colored according to the type, as
specified by the function *signature*. The built-in signatures can color an
arguments as a *variable*, a *function*, a *property*, a *target*, a
*policy*, and finally a CMake keyword is colored as a *type*.
* The constants `true', `false', `yes', `no', `y', `n', `on', and `off' are
colored as *constants*.
* `${...}' constructs are fontified as *variables*. Nested constructs are
supported.
* For `$ENV{...}', `ENV' is fontified as a *variable* and the content as a
*constant*.
* For `$<name:...>' constructs, `name' is colored as a *constant*.
* For preprocessor definitions like `-DNAME', `NAME' is colored as a
*constant*.
About me: I'm an Emacs veteran with more than 20 years of experience (even
though I'm relatively new to CMake). I'm the author of `cwarn-mode',
`follow-mode', and I wrote the original java font-lock rules for Emacs.
Sincerely,
Anders Lindgren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130405/28767aa5/attachment.htm>
More information about the CMake
mailing list