From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Aurel Buche Newsgroups: gmane.emacs.devel Subject: font-lock-mode limitations Date: Tue, 19 Mar 2019 17:11:02 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008165490584759af9" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="71746"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 19 19:11:06 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6JCa-000IUt-To for ged-emacs-devel@m.gmane.org; Tue, 19 Mar 2019 19:11:05 +0100 Original-Received: from localhost ([127.0.0.1]:32964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6JCZ-0004Av-RH for ged-emacs-devel@m.gmane.org; Tue, 19 Mar 2019 14:11:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6IHj-0000xz-FO for emacs-devel@gnu.org; Tue, 19 Mar 2019 13:12:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6IHa-0005sT-3Q for emacs-devel@gnu.org; Tue, 19 Mar 2019 13:12:13 -0400 Original-Received: from mail-yw1-xc2b.google.com ([2607:f8b0:4864:20::c2b]:42236) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h6IHU-0005jC-U1 for emacs-devel@gnu.org; Tue, 19 Mar 2019 13:12:06 -0400 Original-Received: by mail-yw1-xc2b.google.com with SMTP id e76so16499927ywa.9 for ; Tue, 19 Mar 2019 10:12:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ZXY1MLTUwTiQ9vv6xpJYtcdCqXiYTuUxFsHxw6Mq6jQ=; b=ExDjwj8Tkjq7ki3g71t799hky1D+TBiN1xc7+lowGDNdWAB2J6oI90/8e5UZw2WxiY RIEaGA7J3r0zeRPmFhMyR6D/1L4qaWO/MUnOKdpPxZJ8hhYrNXGyp8Ofs9g0fwMARRs9 Xrtej+IjNz4ASKaiq8+CRTohotZ6ekWlT2AV6fk1codzrKBAHXEfQN1fs0zlxLNe9WlO /rG0S4GTxI26iD8u5luLPg6UwfUlkbbBtPplisV5sn1xMIzHOCXyvjQFvBRUU25kFXry 1VnQenm8naWhFc3/x0DnwkwMJsGC6xu6nT/mVRAtxM5vOjckYfVzPkVhw57rqRd/BMGP VBBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ZXY1MLTUwTiQ9vv6xpJYtcdCqXiYTuUxFsHxw6Mq6jQ=; b=lfp3oWEgIDRUdMd3NH9vzIPBO3yx3xhFmnlLvM8FokJd8CJsfAsYpkYgiNr5b9r+zS W874RwNrlErtyyCftqorlvAvcetHMSKgsiRWw4Pe9AyH9tHLydpRgIn8cJ53GuD64CPa 3o7ZHs1kytLaIEmcFm02lnmhQmhPg6pfQ9W70HEPtUhl1psWUfZau+3nyaK8dfTVubZM ocM7pG4e3RcPh1B5gn4RvWzwFjeVm4TymfJVDXfAPvrlAMna/y99UPD3dLKaymQ9v2fR 7KRMY+liY5bLxVb0HN8zaqtJJzoA7i09trkzCLhvB3Qn1BFkciBeAbGWXIHD2pEqKUdD C9QA== X-Gm-Message-State: APjAAAWz1/B9EN9hs15SMz4Z//VjvMRdQw6fK83GMWq0z2f9MUPk8mN1 OgoDdrh99ui4h+SDBSyIHYOgiurINoZQRf/GViMVYdWP9Do= X-Google-Smtp-Source: APXvYqxfG8UBfZ795/GZwajDJ+s2AR7K1qk1A2b0VJj7EtmIiwuRxiQdzAPvGqojIxT0N93HX6XQl+I+M6f6ZOq5T10= X-Received: by 2002:a25:d394:: with SMTP id e142mr2918979ybf.190.1553015521763; Tue, 19 Mar 2019 10:12:01 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::c2b X-Mailman-Approved-At: Tue, 19 Mar 2019 14:09:58 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234374 Archived-At: --0000000000008165490584759af9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I am working for a company that uses a proprietary Scheme based language The language has a rich API and its own conventions, so I created a new major mode but I am struggling with fontification: I have elisp functions to fetch all documented functions and user-defined functions from my code and add them properly to font-lock-defaults (using regexp-opt) Everything was working fine while I was fetching keywords from a very limited number of modules. But now I am using more of them and I have hundreds (maybe thousands) of keywords to highlights. Now that I added more functions to font-lock-defaults nothing is highlighted anymore. I really need to add those modules and I definitely require fontification as I am too used to it. I don't want to replace keywords with more global regular expressions as it is really helpful to have keywords highlighted only when they are written properly 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 Do you have a solution or an idea to increase the limits of keywords that can be matched by font-lock-mode ? I would be extremely grateful if you can help me Regards, Aur=C3=A9lien Buchet --0000000000008165490584759af9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I am wo= rking for a company that uses a proprietary Scheme based language
The language has a rich API and its own conventions, so I created a new ma= jor mode but I am struggling with fontification:

I= have elisp functions to fetch all documented functions and user-defined fu= nctions from my code and add them properly to font-lock-defaults (using reg= exp-opt)

Everything was working fine while I was f= etching keywords from a very limited number of modules. But now I am using = more of them and I have hundreds (maybe thousands) of keywords to highlight= s. Now that I added more functions to font-lock-defaults nothing is highlig= hted anymore.

I really need to add those modules a= nd I definitely require fontification as I am too used to it.
I d= on't want to replace keywords with more global regular expressions as i= t is really helpful to have keywords highlighted only when they are written= properly

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

Do you have a s= olution or an idea to increase the limits of keywords that can be matched b= y font-lock-mode ?

I would be extremely grateful i= f you can help me

Regards,

Aur=C3=A9lien Buchet
--0000000000008165490584759af9--