emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: font-lock-mode limitations


From: Stefan Monnier
Subject: Re: font-lock-mode limitations
Date: Tue, 19 Mar 2019 14:48:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> hundreds (maybe thousands) of keywords to highlights.  Now that I added more
> functions to font-lock-defaults nothing is highlighted anymore.

You need to look for the actual error that causes this.
Is there are relevant message in *Messages*?
Maybe M-x jit-lock-debug-mode RET (along with enabling the debugger)
could help as well.

> I took a quick glimpse at font-core.el and font-lock.el but I could not
> find where the regexp match limitations are set

The limits would be in src/regexp.c

BTW, instead of creating a monster regexp, maybe another approach is to
use a simple regexp that matches any identifier in function position
and then look up a table to see what kind of highlighting to apply to it
(IIRC that's what we do in elisp-mode to highlight macro calls
differently from function calls).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]