Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternatives to font-lock

I'm trying to improve Emacs highlighting of Common Lisp and I'm stuck at regexp approach to highlighting used by font-lock. Regexps aren't enough as I want to be able to recognize structure of such forms as defun - highlighting of functions' argument list should be different from the bodys' highlighting, not just global search-and-highlight.

So, are there any alternatives to font-lock in Emacs itself or somewhere in the Internet? And if so, does they operate on symbolic expressions?

like image 948
sergv Avatar asked Dec 22 '22 04:12

sergv


1 Answers

Emacs' font-lock matching is not restricted to regular-expression; you can use any function as matcher provided it satisfies certain protocol. Take a look at the variable font-lock-keywords for more details.

C-h vfont-lock-keywords

like image 191
huaiyuan Avatar answered Dec 27 '22 11:12

huaiyuan