I write a simple emacs mode. How do I explicitly specify that all things in e.g. square brackets should be colored. Must be smth like that:
( (if thing is in square brackets) . font-lock-string-face)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I assume you’re writing a major mode, but
font-lock-add-keywordsworks also in minormodes. Check out its documentation with
C-h f RET font-lock-add-keywords.