2

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

1 Answer 1

2

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

(add-hook 
 'clojure-mode-hook
 (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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.