From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Fontification using a syntax tree Date: Sat, 18 Sep 2021 13:16:07 -0400 Message-ID: <161e0e8c-4c03-379b-c8fb-332cb91db4a8@gmail.com> References: <87bl4pc2tq.fsf@hugot.nl> <87lf3talmr.fsf@hugot.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24166"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 18 19:18:01 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRdyT-00064F-S7 for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Sep 2021 19:18:01 +0200 Original-Received: from localhost ([::1]:55376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRdyS-0001FL-4O for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Sep 2021 13:18:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRdwi-0007n4-B5 for emacs-devel@gnu.org; Sat, 18 Sep 2021 13:16:12 -0400 Original-Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]:34529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRdwg-00076d-PQ for emacs-devel@gnu.org; Sat, 18 Sep 2021 13:16:12 -0400 Original-Received: by mail-qk1-x72b.google.com with SMTP id a66so27909287qkc.1 for ; Sat, 18 Sep 2021 10:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=xiGIWGb9wPjTjQ4dT1VblCocq27xQIJYC47ktK/DO34=; b=DAisDwCvkjEUiw+29b/UTXDBbNV5dBXd04FSg1AVx/M730jvGb6/6lb3Tt1ebD5G3D MEtOuLgRYh7vacCKi4KaR0k7OI4SdgPScBVOg64Z9WJ8OGDTTw+MnBCbj0hp3UVR3rqm H1tIrff+SKnCDL2Ox4CuG/5wn2kN9wt/W63cZaRfsKRRRozoRKKKjjKvD+kWXE6slQN0 FAatLBQ529WbGxLUS24lPB0xEoztVpd1ipCO3nUOhqj5Rq9ZUGwE5tpEpCmCzG2WzyBr yVC9pq3WAks3BqjovcRjYVs9ntknVxn7GIYz+6gmuybWtcvoRbR4qxVozY5WEEz3mOaf xunw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xiGIWGb9wPjTjQ4dT1VblCocq27xQIJYC47ktK/DO34=; b=QV1Q76HAZdVGAsNanOcTILKLbzrjUIWIknm2ts57aAoRyxhOeZNcOHM6Wp3L8JtrTu EC1ful9K15t+6DMZma40KstuEl3sZO0YbLGSWBdUFGiVRFBZlRpVc9a1cnDsDzijOykA RQFMSteyR7eoao9P/uhj+8Qcgjl87Hi/oIR6eALT38JlmYgnEinE7gKHHy/SZQYwT6Xl M2ognuGQ9t2CEVJfE4b/J3LCnOBzEHk5epG+TuoC57qCAnoB49DgoFLEd767YO9eet+J jAz3CM7zBIdarPPZN2zLifstktjT/0X0Bmxn//3U38vLWri3FBXvNtnaYuJYpJJZg7ZS zOXw== X-Gm-Message-State: AOAM533kxTsAi+XmBLIftT77Dpks6IfZKQq+yx2Ng1zAYRJN9QxSVzja YwdlOOLItLeHAR6ooTza9oPrYR5bpU4= X-Google-Smtp-Source: ABdhPJyB4YXlu2qf6XlMz0BE5LZcE+D7DZlP+inAHlAn33CZSik0UwP2Upyd3NA4bBHBgVTf5SI0gg== X-Received: by 2002:ae9:eb89:: with SMTP id b131mr1935682qkg.434.1631985369238; Sat, 18 Sep 2021 10:16:09 -0700 (PDT) Original-Received: from [192.168.1.15] (c-24-61-240-80.hsd1.ma.comcast.net. [24.61.240.80]) by smtp.googlemail.com with ESMTPSA id 13sm7155416qka.56.2021.09.18.10.16.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Sep 2021 10:16:08 -0700 (PDT) In-Reply-To: <87lf3talmr.fsf@hugot.nl> Content-Language: en-GB Received-SPF: pass client-ip=2607:f8b0:4864:20::72b; envelope-from=cpitclaudel@gmail.com; helo=mail-qk1-x72b.google.com X-Spam_score_int: -45 X-Spam_score: -4.6 X-Spam_bar: ---- X-Spam_report: (-4.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-2.538, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275017 Archived-At: On 9/18/21 12:34 PM, Hugo Thunnissen wrote: > Yuan Fu writes: > >> You can bind font-lock-fontify-region-function and friends to your custom functions. >> >> Yuan > > Ah, I see. I didn't realise that this would override syntax-table > related behavior in all scenarios. Thanks! Check out js2-mode, too: it does that for Javascript, so reading through the sources should be instructive. http://steve-yegge.blogspot.com/2008/03/js2-mode-new-javascript-mode-for-emacs.html