Question
Pretty straightforward: How to highlight constexpr
in cc-mode (editing C++ code)?
Example
If I use const
as in the following example
const double = 3.14
const
gets highlighted as a keyword(1) (i.e., in pink), while if I write
constexpr double = 3.14
constexpr
gets highlighted as all-faces
(i.e., no highlighting at all).
Ideally, a simple solution like writing
(add-to-keywords "constexpr") ;; pseudo-code
in my .emacs
without tinkering with the code of cc-mode would be the best for me.
Addendum
This question might be related: Change the way CC-mode font-lock the C++11 auto
syntax.
Note
(1) I think that it is a keyword because placing the pointer on the word and doing M-x customize-face
RET I get: Customize face (default ``font-lock-keyword-face'):
and pressing RET I get redirected to the “Easy Customization” wizard.