2

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

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, privacy policy and cookie policy

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