From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jakub Jankiewicz Newsgroups: gmane.emacs.help Subject: Use JS regex syntax in Scheme mode Date: Sat, 8 Aug 2020 20:59:19 +0200 Message-ID: <20200808205919.77e5e778@jcubic> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/h6xsEqOzN.RfudKH89_.2Qa"; protocol="application/pgp-signature"; micalg=pgp-sha256 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17054"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 08 20:59:59 2020 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 1k4U4U-0004Ke-VE for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 08 Aug 2020 20:59:58 +0200 Original-Received: from localhost ([::1]:60840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4U4U-0008Q7-1U for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 08 Aug 2020 14:59:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4U46-0008Om-Bk for help-gnu-emacs@gnu.org; Sat, 08 Aug 2020 14:59:34 -0400 Original-Received: from smtpo99.poczta.onet.pl ([213.180.149.152]:54481) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4U44-0001e6-DX for help-gnu-emacs@gnu.org; Sat, 08 Aug 2020 14:59:34 -0400 Original-Received: from jcubic (unknown [185.129.114.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jcubic@onet.pl) by smtp.poczta.onet.pl (Onet) with ESMTPSA id 4BPBNT64PRz1XZWL6 for ; Sat, 8 Aug 2020 20:59:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onet.pl; s=2011; t=1596913161; bh=Jgnpadd3jRWwzpE90YgBc9njsjeoFhMZiZ9uZEW7tTg=; h=Date:From:To:Subject:From; b=aW7djVzHTPysRuz3xUcjC3K7ioTzExw1ZZProYzTrFUbaCWzBMuCpc3wUMggQAv/p 1hbazgReII6aZXElCcwZE4PTzzHyViiXegfcnhwWkb2+yBQOx+tWs3NncM2o2BzLvq vSmeJ52SpUhm7wrEG5DaPcIGyvlW1xe3ucjHpGsc= X-Mailer: Claws Mail 3.17.3git196 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-ONET_PL-MDA-SEGREGATION: 0 Received-SPF: pass client-ip=213.180.149.152; envelope-from=jcubic@onet.pl; helo=smtpo99.poczta.onet.pl X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/08 14:59:27 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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:123649 Archived-At: --Sig_/h6xsEqOzN.RfudKH89_.2Qa Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi, Is it possible to merge any JS mode that have regular expressions and integrate it with scheme mode? How hard it would be? I have Lisp written in JavaScript https://jcubic.github.io/lips/ and I would like to have proper Emacs Mode for my language. The language is based on scheme (almost 100% compatibile with R5RS and I'm wokring on R7RS) but have few extensions like literal regular expressions that are alm= ost the same as one in JavaScript except it can't have space after first / to prevent matching expressions like (/ (* 10 (/ 10 2)) I thikng that I will disable completly spaces in regexes to prevent any ambiguity. I also have object literals that are create created using syntax extensions I've created for my language: &(:foo 10 :bar 20) create JS object & is the same as ` or ' in scheme it map to macro call. I have some experience with Emacs Lisp, but I didn't read much code and I don't have much experience in creating Emacs modes, even that I have created one that is on GitHub (for JS & PHP code coverage that I was not ab= le to merge with coverage.el because original author only care about Ruby). Could anyone give me some tips how should I go about and create such mode? Where I should look for regexes in JS mode and how should go about and addi= ng them to scheme mode? Thanks Jakub -- Jakub Jankiewicz, Web Developer https://jcubic.pl/me --Sig_/h6xsEqOzN.RfudKH89_.2Qa Content-Type: application/pgp-signature Content-Description: Podpis cyfrowy OpenPGP -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEvGU/kjFLOYteHgvHpY7m8TH4MBMFAl8u9ggACgkQpY7m8TH4 MBM4IAgAwYKljG/lTx1Ef+6HGIn6WEJpfpDm1nuoBCeDNobbOqeXe+zfN0V2kriE 4v/aPQSuAHPOzb/El9mXOXOSyEpgeU1PoE+gsKvjwysotR3X6C0L50ambXyP37SO bboMTRpm3gVCd2jvgFoWdBRw8XEDjs4jafmLI2oMDp4soT01kY+1U4mpfTdrGkCS 7nQIXk5rwOYoAVaC3S6K+TwM1tSlj6JfrUWL1scv7S7WqROSW2MUGs8MdRSLPflW ls6qgDKnLWT8kYv6JpXxrHvs2CGfZalWXXKcAFUOfG7rtd9sjKugcHtk1msXdpFB AYSwqgJMxnU4Gx3rPDfB9/+mm63A2g== =iBe+ -----END PGP SIGNATURE----- --Sig_/h6xsEqOzN.RfudKH89_.2Qa--