I'm writing tests for
color-identifiers-mode I co-maintain, and I stumbled upon a problem that after creating a buffer and enabling
c-mode in it, there is no highlight over keywords.
For example, if you open a usual C file containing
struct foo;, executing a
(print (get-text-property (point) 'face)) over the first character will give you
However, doing the same in a temporary buffer with
c-mode enabled gives instead
(with-temp-buffer (insert "struct foo;") (c-mode) (goto-char 1) (print (get-text-property (point) 'face))) ;; evaluating will give you `nil'
Any ideas, how to fix that?