From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.help Subject: Re: Ektending rainbow-delimiters to colour {} Date: Tue, 19 Jul 2022 11:45:44 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Vbta1XB/9TG+mKC/" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23836"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: carlmarcos@tutanota.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 19 11:46:22 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 1oDjo5-0005zJ-SI for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 19 Jul 2022 11:46:21 +0200 Original-Received: from localhost ([::1]:51794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDjo4-0000Lb-QO for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 19 Jul 2022 05:46:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDjnZ-0000Kj-RT for help-gnu-emacs@gnu.org; Tue, 19 Jul 2022 05:45:49 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:40370) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDjnX-0002gB-OV for help-gnu-emacs@gnu.org; Tue, 19 Jul 2022 05:45:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject :Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1s+xHMYOC2bEX8IO49ZbV3xhp931j6rqQf/5levjs7g=; b=sQLGyJrIayoqMJB3DcqG12PQE+ luThh78D7hIlSyLY1mz7Gxps71LrhAQkiOHdMEFQ6SqnJ5vf9fGeUbDwIm1YUct5QtkT6LxDCDylw ANjEm6RmX7xqqcgLlBpPu3PdHkdzSyC1YFuNbutMveffK2TjfqOkfMmz1PVv/bppomba+rn/irxpm Lei5NlI38sQxJrSRsqxStyH0es2LQU0p+6Wp2T3nyOhBBEf1L6vFdiSGKXXnlcHBTHDMN3AS51//l GJmpTGcZGnNB5ZiusckfV9ow+UdgtZnSKL2k/05ZS+7wW3T0sr5kY3PWS0yLtDvSM1BHFGjB0pkxk Vswrmhww==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1oDjnU-0005NS-Sz; Tue, 19 Jul 2022 11:45:44 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:138528 Archived-At: --Vbta1XB/9TG+mKC/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 19, 2022 at 11:31:48AM +0200, carlmarcos@tutanota.com wrote: >=20 > Jul 19, 2022, 08:39 by tomas@tuxteam.de: >=20 > > On Tue, Jul 19, 2022 at 10:21:15AM +0200, carlmarcos@tutanota.com wrote: > > > >> > >> Jul 19, 2022, 07:34 by tomas@tuxteam.de: > >> > > > > [...] > > > >> > Look up the documentation for `skip-syntax-forward'. Then read on > >> > syntax classes. Then, be enlightened :) > >> > > >> >From the help for skip-syntax-forward, if syntax starts with ^, skip = characters whose syntax is not in syntax. > >> > > > > Nearly. > > > > Dig deeper: what could that "syntax" thing mean? Did you read on syntax > > classes in the manual? Does this answer your question? > > > I have read.=C2=A0 Looks as if emacs has internal functionality to determ= ine start and end of elisp > expressions, which rainbow-delimiters relies of.=C2=A0 It does actually a= lso follow [], not so for {}. =C2=A0=C2=A0=20 Read again: The =E2=80=9Csyntax class=E2=80=9D of a character describes its syntactic= role. Each syntax table specifies the syntax class of each character. There is no necessary relationship between the class of a character in one syntax table and its class in any other table. So whether { resp } have the syntax class symbolised by ( resp. ) depends on how you set up your syntax class table. Major modes set that up to match the expectations of the language in question. In theory you could even set # . up as opening and closing parentheses whenever it makes sense. The answer is: Emacs _already does_ what you want. Cheers --=20 t --Vbta1XB/9TG+mKC/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCYtZ9QgAKCRAFyCz1etHa RgaQAJ4/5Q6SU7YBEFQZDCOUH4UiqruQ3gCfRMPOoJgqntUoFrbS0LQ6zAxDDW4= =+hnO -----END PGP SIGNATURE----- --Vbta1XB/9TG+mKC/--