Skip to content

Instantly share code, notes, and snippets.

@jordonbiondo
Created August 6, 2013 17:44
Show Gist options
  • Save jordonbiondo/6166745 to your computer and use it in GitHub Desktop.
Save jordonbiondo/6166745 to your computer and use it in GitHub Desktop.
;; given the text "abc foo bar baz" I want abc to use the keyword face and following words to use the type face
;; currently abc will be colored correctly but only baz would use the type face
(font-lock-add-keywords 'mode
'(("\\(abc\\)\\( +[a-z]+\\)+"
(1 'font-lock-keyword-face)
(2 'font-lock-type-face))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment