Working to create my own major mode for sqf language (arma3 scripting) I get this error:
Error during redisplay: (jit-lock-function 1) signaled (invalid-regexp "Regular expression too big")
Error during redisplay: (jit-lock-function 501) signaled (invalid-regexp "Regular expression too big")
The issue is a list of specific built-in language commands that reaches about 2500 of them initialized as following:
(defvar arma-commands
'(
"abs"
"accTime"
...
"worldToScreen" ;; thats the 2500th command ;-)
))
Using the common (,(regexp-opt arma-commands 'words) . font-lock-builtin-face)
for highlighting properly raises that error I mentioned before.
Is there any right and efficient way to solve this?
(/ (expt 2 16) 2500)
for the jit lock to explode every time. What is the total length of all the words in your regexp?