Apply font lock to quoted symbols in elisp
elisp, emacs, font-lock, lisp, syntax-highlighting
Solution
Try:
(font-lock-add-keywords 'emacs-lisp-mode
'(("'[-a-zA-Z_][-a-zA-Z0-9_]*\\>" 0 'font-lock-constant-face)))
Or (if you don't want the quote colored):
(font-lock-add-keywords 'emacs-lisp-mode
'(("'\\([-a-zA-Z_][-a-zA-Z0-9_]*\\)\\>" 1 'font-lock-constant-face)))
This will not color things in comments or strings, as they are colored in earlier, and font-lock (by default) doesn't re-color things.
Problem
In Emacs I would like quoted symbols in emacs lisp such as: `'blah` and display them in a different color. How can I use `font-lock` mode to do this?