Skip to content

Instantly share code, notes, and snippets.

@vermiculus
Created October 17, 2014 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vermiculus/6b2e6aad3c2ec14dc20d to your computer and use it in GitHub Desktop.
Save vermiculus/6b2e6aad3c2ec14dc20d to your computer and use it in GitHub Desktop.
; (defface font-lock-warning-face
; '((t :inherit error))
; "Font Lock mode face used to highlight warnings."
; :group 'font-lock-faces)
(defface my-code-section-face
'((t :inherit error))
"Face used for comment guards")
(defun add-c-syntax-highlighting ()
(font-lock-add-keywords nil '(
("\\(//\\-+\\)" 1 (if t font-lock-warning-face
my-code-section-face) prepend))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment