From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#59807: 29.0.60; [PATCH] python-ts-mode does not auto-complete the closing quote Date: Sat, 3 Dec 2022 23:28:23 -0800 Message-ID: <7CF63D0F-B80E-446C-9E22-5CA05A4ACA22@gmail.com> References: <83y1rnbpq8.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28943"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Kai Ma , Theodor Thornhill , 59807@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 04 08:29:19 2022 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 1p1jR9-0007Ox-FL for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Dec 2022 08:29:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1jQt-0000UN-Jf; Sun, 04 Dec 2022 02:29:03 -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 1p1jQs-0000UD-Ft for bug-gnu-emacs@gnu.org; Sun, 04 Dec 2022 02:29:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1jQs-0000NR-7T for bug-gnu-emacs@gnu.org; Sun, 04 Dec 2022 02:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p1jQs-00086J-3h for bug-gnu-emacs@gnu.org; Sun, 04 Dec 2022 02:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Dec 2022 07:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59807 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59807-submit@debbugs.gnu.org id=B59807.167013891331132 (code B ref 59807); Sun, 04 Dec 2022 07:29:02 +0000 Original-Received: (at 59807) by debbugs.gnu.org; 4 Dec 2022 07:28:33 +0000 Original-Received: from localhost ([127.0.0.1]:55931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1jQO-000864-Lj for submit@debbugs.gnu.org; Sun, 04 Dec 2022 02:28:33 -0500 Original-Received: from mail-pj1-f53.google.com ([209.85.216.53]:46681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1jQN-00085w-02 for 59807@debbugs.gnu.org; Sun, 04 Dec 2022 02:28:31 -0500 Original-Received: by mail-pj1-f53.google.com with SMTP id b13-20020a17090a5a0d00b0021906102d05so8648276pjd.5 for <59807@debbugs.gnu.org>; Sat, 03 Dec 2022 23:28:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=pwfYeAQDjZUhT//KY+rK81yWamPRAcy+xzGnB+nC5rc=; b=bUZKcEOWb67r2R713TLdkCLRJYKhv/KbsiedxIbXOpbhVdK7U4LEQXWncNJF7EHHYS NVZz9HHakPhMIXZE0HXdLEJBk56pi5NOKevDOkeGq243O+5z7bPcogazqOM6Rsp4jfHM g/73w5GzqL23aW/a1jyYNMyt4oS8PkiLu78bWGUBNssnYc5K658s4HQ/uByvj/2Zq4RL BpAZOnNx5lfclXXEo/ryKx8zmBSxWeU/9j+axY6LcfmFW/B+8pSRrig2PiGrSBGS4BCE GEWT2GMHab5DzawjKOW+d5erqxIxYktlGJPwxpRoFumgeByo0a545h8nC1ZoWYsSIbJT IaMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pwfYeAQDjZUhT//KY+rK81yWamPRAcy+xzGnB+nC5rc=; b=UAYAUe1TAHg23KqC8VTHv8cEI0NmU/n57Yk28nGIPeBpzWiE79MMcTyiYcLFQpAs8H xEURCtPOdD9fQKsdCovW4AqbUz1oO9MqH/dKiO2qLp50Hlg03eqzkkAPe2HooesiMhVE v66/lwqfPlTF03ViiH8m4N/l8yXQBPN2d/tGJJvWafVmQbARZLz6qY1lAv9qIdq4QL8j 1ureBu1HMmvZZKs41qqvFO1nVAKe8ma+Q8Qmq9PWgEybZw1L63yemAznNdTzPhvTdcfZ gJBOWRTISSSRUnYt25IoLwwUMi7aRerLq28oxdLE0b/U2ECvEW/Jx6IUwNoRvxHjSMkU srzQ== X-Gm-Message-State: ANoB5pmlg8XqoHuLEXdEbRlwSjpixvtyDR0mcdXQ+FDCE5IAl07fYEF4 +1Sl9cfwh8DHnHuYpWCCerw= X-Google-Smtp-Source: AA0mqf6w4OnxP32kXCdpP0GKXxStJV60wuOYGnUtR/F2JfgGcnT6Un5/W5nCvck40Ip8Y2VwwVldEw== X-Received: by 2002:a17:902:7c0e:b0:189:907c:8390 with SMTP id x14-20020a1709027c0e00b00189907c8390mr31878930pll.126.1670138905025; Sat, 03 Dec 2022 23:28:25 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id q8-20020a17090311c800b0018544ad1e8esm8362340plh.238.2022.12.03.23.28.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Dec 2022 23:28:24 -0800 (PST) In-Reply-To: <83y1rnbpq8.fsf@gnu.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) 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:249903 Archived-At: > On Dec 3, 2022, at 11:19 PM, Eli Zaretskii wrote: >=20 >> From: Kai Ma >> Date: Sun, 04 Dec 2022 06:27:18 +0800 >>=20 >> When electric-pair-mode is enabled, a single quote ' should be auto >> completed to be '' (which means an empty string). Python-mode = correctly >> does this, but python-ts-mode does not. This is clearly a problem >> regarding the syntax table. >>=20 >> The attached patch makes python-ts-mode uses the same syntax table as >> python-mode's, and fixes this problem. I also checked a few other ts >> modes, and some also have this issue. For example, js-ts-mode does = not >> auto complete '' either, which is also fixed by this patch. >>=20 >>> =46rom 7f996826bc47bcdd155eb0cc220a48c32cb2619a Mon Sep 17 00:00:00 = 2001 >> From: Kai Ma >> Date: Sun, 4 Dec 2022 06:15:42 +0800 >> Subject: [PATCH] Fix syntax tables of tree-sitter modes >>=20 >> Tree-sitter modes should use the same syntax table as the >> non-tree-sitter ones. >> * lisp/progmodes/csharp-mode.el (csharp-mode-syntax-table) >> (csharp-mode): >> * lisp/progmodes/js.el (js-mode-syntax-table) (js-ts-mode): >> * lisp/progmodes/python.el (python-ts-mode): >> * lisp/progmodes/sh-script.el (bash-ts-mode): >> * lisp/textmodes/css-mode.el (css-ts-mode): >=20 > Thanks, but please format the log message according to our = conventions: > there should be a description of the actual changes after the last = colon. >=20 > Yuan, is it really true that the syntax tables in treesit-supported = modes > should be always identical to those of the non-treesit modes? Or = maybe > there could be subtle differences? IMO yes. But since I=E2=80=99m not the original author of some of the = modes, I included Theo for his opinion. Yuan