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#67262: python-ts-mode cannot identify triple-quoted-strings Date: Sat, 23 Dec 2023 19:10:05 -0800 Message-ID: <50F7C069-4750-42E0-9B65-66CE31850C51@gmail.com> References: <66A741A1-38B8-40C9-BE84-AF99F74A079F@gmail.com> <838r6vm3dj.fsf@gnu.org> <9bfc5e6f-3612-115f-a59d-35ad629bdf9e@gutov.dev> <83v89qcfsb.fsf@gnu.org> <9B8C904A-3729-44AF-82F7-3BEA849F46D0@gmail.com> <83le9umhzh.fsf@gnu.org> <6b009ad5-2a09-f4e5-8ebe-8a7744692473@gutov.dev> <2C8AF27C-596F-4F7B-879C-9EB7497C45D1@gmail.com> <83edfddz5g.fsf@gnu.org> <4E036F58-8190-42BF-A6EC-7967BE3921B2@gmail.com> <90B31D18-7607-4D37-A6B4-5CFE3C4F40A9@gmail.com> <2d6c8f44-e59e-4752-811a-ce7eebd3ee09@gutov.dev> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31648"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 67262-done@debbugs.gnu.org, JD Smith To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 24 04:11:26 2023 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 1rHEti-00086n-OF for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Dec 2023 04:11:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rHEtJ-0005x9-Uw; Sat, 23 Dec 2023 22:11:01 -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 1rHEtG-0005wY-Uz for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 22:10:58 -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 1rHEtF-0000oP-3p for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 22:10:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rHEtK-0003Ke-MX for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 22:11:02 -0500 Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Dec 2023 03:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 67262 X-GNU-PR-Package: emacs Mail-Followup-To: 67262@debbugs.gnu.org, casouri@gmail.com, jdtsmith@gmail.com Original-Received: via spool by 67262-done@debbugs.gnu.org id=D67262.170338743612773 (code D ref 67262); Sun, 24 Dec 2023 03:11:02 +0000 Original-Received: (at 67262-done) by debbugs.gnu.org; 24 Dec 2023 03:10:36 +0000 Original-Received: from localhost ([127.0.0.1]:51556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rHEst-0003Jx-Ji for submit@debbugs.gnu.org; Sat, 23 Dec 2023 22:10:35 -0500 Original-Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:44280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rHEss-0003Ji-2C for 67262-done@debbugs.gnu.org; Sat, 23 Dec 2023 22:10:34 -0500 Original-Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3ba52d0f9feso2372877b6e.0 for <67262-done@debbugs.gnu.org>; Sat, 23 Dec 2023 19:10:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703387422; x=1703992222; darn=debbugs.gnu.org; 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=dYpZA3gWKY4X/pLs8HvbWHFMYSjWjreW3e70Rc5CtEQ=; b=AROCjNas+4h8a6+hM1TG/NAYRGGuHyiFLw7jvdOqbR1KSQDHa/Bra/klbWyQr+SgXR vi7kN/P3RuOOX0sa56VGXAQo6hrsbBd9uL0O3Ow0oefyO1o23g5nwq5Q74n5yI1ChAnq CkpCN8wsddUmDCPw+JExdG6EjcIa3U4eozE+bhaVj7V4bh3Axop5on7ldLaaphyH3GEB MfdJNJ29ZQNr+Mj8vLvnjhGiwPMAEhmvnXx1UgEB9sslM9v7AVjMtmWqSiLZ8qmoCelI UHC67irtYljLbzWQgT26kpQ71Idr4scULi4Q67fJWo7vmqydefqoBf9BCDdyOjxupyBc Wpmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703387422; x=1703992222; 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=dYpZA3gWKY4X/pLs8HvbWHFMYSjWjreW3e70Rc5CtEQ=; b=gielXWE7lwP6wD4mLmFs2FxEpWfGhazzEmMTQwQv8oFbXQwMzKkEiGtagUEExSuual f9JFGm2zVYQxP23bS18786d6cycrGtvk2e0ZRaRIomPsgAeZy7S0UfxZfF6TFxc5tDtu 4bzOXSF6seWQDtkbKMjO7LuYwDp3KotdJ+B8gOMM/oWEE9lyZ8xrxsqOYPEaUKZfsSiu bCuIcVu1B/ct+lvoC1NhpgFHUWqFc5Fq7sICICh2cshRXtuujoRV6xwu0WPxnl/H4rtp vM4i2dVAXzUBTmRfZ3PKgWW306hgrk7PveCyDSwaKodmf56gTfK/KSgd/i3+tqumwLfU S0uQ== X-Gm-Message-State: AOJu0Yx5VUfNgVeocLJ+c+8XqFHLyUAvUE2CUvYvxKcz0016YyMFkKCo 7kKE9dcqtCc6TL20DoxxenQ= X-Google-Smtp-Source: AGHT+IHKFshmLibFdO6FIDiiAADFbSEyfyMsR7lMjsA6Bzg/Nx9PZQYJLt1ByGi4Zl44nvw8PtAMkQ== X-Received: by 2002:a05:6808:17aa:b0:3b9:fc7c:b585 with SMTP id bg42-20020a05680817aa00b003b9fc7cb585mr4315056oib.32.1703387422447; Sat, 23 Dec 2023 19:10:22 -0800 (PST) Original-Received: from smtpclient.apple (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id v10-20020a056a00148a00b006d96ad39308sm410819pfu.165.2023.12.23.19.10.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Dec 2023 19:10:22 -0800 (PST) In-Reply-To: <2d6c8f44-e59e-4752-811a-ce7eebd3ee09@gutov.dev> X-Mailer: Apple Mail (2.3731.700.6) 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:276784 Archived-At: > On Dec 23, 2023, at 4:45 PM, Dmitry Gutov wrote: >=20 > On 24/12/2023 01:51, Yuan Fu wrote: >> Something like this? IMHO the code is easier to understand without = the syntax-propertize-rules. >=20 > Sure, fine with me. >=20 >> + (while (search-forward "\"\"\"" end t)+ = (put-text-property (1- start) start >=20 > I think we also should support the triple-single-quotes, like = python-syntax-propertize-function does. >=20 >> + 'syntax-table (string-to-syntax "| = ")) >> + (put-text-property end (min (1+ end) (point-max)) >> + 'syntax-table (string-to-syntax "| = ")))))))) >=20 > The spaces after "|" seem unnecessary. Thanks, fixed those things and pushed to emacs-29. Yuan=