From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: rainbow-delimiters-mode, syntax-begin-function and font-lock-beginning-of-syntax-function Date: Tue, 25 Jan 2022 08:55:30 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12244"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Help Gnu Emacs To: fatiparty@tutanota.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 25 16:28:24 2022 Return-path: Envelope-to: geh-help-gnu-emacs@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 1nCNk7-0002vV-NZ for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 25 Jan 2022 16:28:23 +0100 Original-Received: from localhost ([::1]:40724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCNk6-0001D3-By for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 25 Jan 2022 10:28:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCMIO-0007mz-7X for help-gnu-emacs@gnu.org; Tue, 25 Jan 2022 08:55:40 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24467) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCMIJ-0002Tr-V5 for help-gnu-emacs@gnu.org; Tue, 25 Jan 2022 08:55:38 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 90714805CC; Tue, 25 Jan 2022 08:55:33 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 23BCE804FC; Tue, 25 Jan 2022 08:55:32 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1643118932; bh=HGG7CNhNvAbWqrNInzVb5c4N044DwuVNXKf+X8M/ZcE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=AYlp8rcX3LjEm5pMck3RzIn/f0Y87HP7DkIepo0LwtCY+LJ75kx+1PAVjy5Y/J7Pz RhL9LRCUEWWG0LlUTfQsfWmvtZd8BxN95hOwHqY/G1zqKKR4Dliqmq29vZU9oactC7 iZmgNrRkZ9YwvJZ3CfIqERVXwVrtJ36uZfBrjJvLBoLo2ffUX3BHy7uBCvrIGP7a5u lXv8fHLh2/ytXjYfTz2jlbwuc8od5MI/ZdlEyNC7J1fPRk7nwCc9y8lh2D9WqCTWJq dGUEjNA68MFzD9ROsmRM2tRANHc72+tr7Z5zFoqz4q6wIJ3VzoZO1hvWcjqGs75NO4 2NAmXdtcEwptQ== Original-Received: from ceviche (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C6A3A12069F; Tue, 25 Jan 2022 08:55:31 -0500 (EST) In-Reply-To: (fatiparty@tutanota.com's message of "Tue, 25 Jan 2022 14:37:55 +0100 (CET)") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:135524 Archived-At: > Right, if the version of emacs has `syntax-begin-function', then one coul= d use that, > as has been done.=A0 I am making a new version without calls to things th= at would, > be obsolete, but without breaking the colouring functionality.=20 > > There is a call to flush the cache `(syntax-ppss-flush-cache 0' with=20 > `(boundp 'syntax-begin-function)'.=A0 Would this still be necessary?=A0=20 I recommend you read a bit more to understand a bit what these things do (e.g. what does it mean for `syntax-begin-function` to be nil) because changing code which you don't understand at all is just not fun. Stefan