From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#74499: [PATCH] Avoid loading 'rx' at runtime in 'lua-ts-mode' Date: Sun, 24 Nov 2024 19:37:23 +0000 Message-ID: <87ttbwtocs.fsf@posteo.net> References: <87o725czz8.fsf@pub.pink> <87h67xczuy.fsf@pub.pink> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14708"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74499@debbugs.gnu.org To: john muhl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 24 20:38:30 2024 Return-path: Envelope-to: geb-bug-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 1tFIRA-0003fZ-KQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Nov 2024 20:38:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFIQn-0003GS-M3; Sun, 24 Nov 2024 14:38:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFIQk-0003G2-Te for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 14:38:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFIQk-0004LT-Ko for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 14:38:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=E5Vu0hiQsTw5Vk6QQSHF/QRsxJC4FAwVOWiYqP9UBKw=; b=CgUiCQGcQN2srDdehFQPpJ3Sj3r71ZSN4+r+8Td7IbZpVZPD1zVaAfxlWixqoFb7qQPjXllR2NUrrjOcwff/IN3tmgnpqKvpDh1iVlpSV94sLdOhkSEI+oHqxdfh5VIyjwa2RTee2fNn1iAI0wJl6yw6X8WqEiP2C0SDkeCHUb6ynNkCGQp4sCn/kesbc/QiklEo+boqZ40DhYEo+f+Lrbbgt0rIDIOekO43dP8PHCfRRHdegfZb4cWZC5mpe1f+kUdOVaUcnVIE2jM+2cHorUOcgJ5Atz2GYytbdZnllTeghl3p9LT4UzUafxAqFVFY73lnt8NrYVzEpqv34RKVpw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFIQk-0007JQ-7v for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 14:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Nov 2024 19:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74499 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74499-submit@debbugs.gnu.org id=B74499.173247705628063 (code B ref 74499); Sun, 24 Nov 2024 19:38:02 +0000 Original-Received: (at 74499) by debbugs.gnu.org; 24 Nov 2024 19:37:36 +0000 Original-Received: from localhost ([127.0.0.1]:36092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFIQK-0007IZ-0y for submit@debbugs.gnu.org; Sun, 24 Nov 2024 14:37:36 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:39541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFIQG-0007IG-GZ for 74499@debbugs.gnu.org; Sun, 24 Nov 2024 14:37:34 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 53049240027 for <74499@debbugs.gnu.org>; Sun, 24 Nov 2024 20:37:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1732477045; bh=/4qEP/VWvkibGT8jzzxtxN8u/tgPvuTSueHfdhmMgco=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=Iyfjq4O0B5gYhf0pThfkNg8jn5EHsoeyZnatgZ2ijTDTYw6mcYWuBUKTkaWsST2rL QVcsc+09a34CHWccYvYt6PoHlQVATvvEMyRFlwAkmNFtgaGwEnNthZ4fJGKZXrQFM2 /47Fptvw9qO8Xhl7K+PJ+snYPOBi76o72T9btNQWYhABm4nl8D7mnbp/d6uUEtUIzK Q5Io00ndUOmxJhSFSV1ZRMp5CS40LCcqHMv+lJSj7wqSMVWrfBsSauywt6/LjCI6UH 8CRDQBUmDuQC0lpmS3a2TE6NFzehgMAPVgrQ6l9gcLFUUSyNeIucYviV5Dc9+dK5b7 JRN2jUNwEoPfg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XxJyD4SCpz6tvr; Sun, 24 Nov 2024 20:37:24 +0100 (CET) In-Reply-To: <87h67xczuy.fsf@pub.pink> (john muhl's message of "Sat, 23 Nov 2024 17:08:37 -0600") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=philipk@posteo.net; url="https://keys.openpgp.org/vks/v1/by-email/philipk@posteo.net"; preference=signencrypt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295919 Archived-At: john muhl writes: > From 309e80a336bce5c4a9191c87af636b8adfc04b97 Mon Sep 17 00:00:00 2001 > From: john muhl > Date: Sat, 23 Nov 2024 14:08:21 -0600 > Subject: [PATCH] Avoid loading 'rx' at runtime in 'lua-ts-mode' > > * lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua): > Replace 'rx-to-string' and substitution with 'rx' and 'literal'. > > (Bug#74499) > --- > lisp/progmodes/lua-ts-mode.el | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el > index f88fe0e49af..828636f359d 100644 > --- a/lisp/progmodes/lua-ts-mode.el > +++ b/lisp/progmodes/lua-ts-mode.el > @@ -659,9 +659,9 @@ lua-ts-inferior-lua > (setq-local comint-input-ignoredups t > comint-input-ring-file-name lua-ts-inferior-history > comint-prompt-read-only t > - comint-prompt-regexp (rx-to-string `(: bol > - ,lua-ts-inferior-prompt > - (1+ space)))) > + comint-prompt-regexp (rx bol > + (literal lua-ts-inferior-prompt) > + (1+ space))) Strictly speaking this could have introduced a regression, since literal quotes the string, and it might be that someone has set `lua-ts-inferior-prompt' to a quoted regular expression that is now double-quoted, but I assume that this is an acceptable edge-case? > (comint-read-input-ring t) > (add-hook 'comint-preoutput-filter-functions > (lambda (string) > @@ -672,11 +672,11 @@ lua-ts-inferior-lua > ;; accumulate in the output when sending regions > ;; to the inferior process. > (replace-regexp-in-string > - (rx-to-string `(: bol > - (* ,lua-ts-inferior-prompt > - (? ,lua-ts-inferior-prompt) > - (1+ space)) > - (group (* nonl)))) > + (rx bol > + (* (literal lua-ts-inferior-prompt) > + (? (literal lua-ts-inferior-prompt)) > + (1+ space)) > + (group (* nonl))) > "\\1" string) > ;; Re-add the prompt for the next line. > lua-ts-inferior-prompt " ")))