I want to show @ symbols (meaning dereference) in red in clojure-mode. How do I do that?

1 Answer 1


Based on the examples in section Customizing Search-Based Fontification of the elisp manual, I would propose this:

 (lambda ()
   (font-lock-add-keywords nil
           '(("\\(@\\)" 1 '(:foreground "red") prepend)))))

This uses an anonymous face with red foreground, any face could of course be used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.