From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: kobarity Newsgroups: gmane.emacs.bugs Subject: bug#71093: 30.0.50; python: multiple assignments not fontified Date: Sun, 26 May 2024 10:10:27 +0900 Message-ID: References: <86h6eo4qp2.fsf@gnu.org> <864jan2x95.fsf@gnu.org> <86zfsf1cra.fsf@gnu.org> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: multipart/mixed; boundary="Multipart_Sun_May_26_10:10:27_2024-1" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16088"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: andreas.roehler@easy-emacs.de, sunlin7.mail@gmail.com, 71093-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 26 03:12:13 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 1sB2Qn-0003yc-6W for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 May 2024 03:12:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sB2QX-0004IM-A2; Sat, 25 May 2024 21:11:57 -0400 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 1sB2QV-0004I2-7Q for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 21:11:55 -0400 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 1sB2QU-0002LE-VN for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 21:11:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sB2Qc-0005tv-EC for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 21:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: kobarity Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 May 2024 01:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71093 X-GNU-PR-Package: emacs Original-Received: via spool by 71093-done@debbugs.gnu.org id=D71093.171668590921727 (code D ref 71093); Sun, 26 May 2024 01:12:02 +0000 Original-Received: (at 71093-done) by debbugs.gnu.org; 26 May 2024 01:11:49 +0000 Original-Received: from localhost ([127.0.0.1]:57809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sB2QP-0005dv-1e for submit@debbugs.gnu.org; Sat, 25 May 2024 21:11:49 -0400 Original-Received: from mail-pg1-f178.google.com ([209.85.215.178]:48276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sB2QM-0005Rb-0F for 71093-done@debbugs.gnu.org; Sat, 25 May 2024 21:11:47 -0400 Original-Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-6818811cb8aso1405101a12.0 for <71093-done@debbugs.gnu.org>; Sat, 25 May 2024 18:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716685832; x=1717290632; darn=debbugs.gnu.org; h=mime-version:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date:from:to:cc:subject:date:message-id:reply-to; bh=NczHZs+5EoObwep2pjAzs8VcNW/voWK1kjZSLw707n4=; b=mQKvGzf3GOL1U9jHOAXuRxwaNWBI3yJbTO6lRmA9bkcNBmF/wC69w+iIC2VteWt0At M6cQMw6bqpPRiPzXh6Wg8tnidSoEDtC6pT8MUr+MXPIXGuU977bV+FmVM2hNgEJ4aIi8 1Be+Rna24Iz880mGPgEL3TPekZsEtTtHxhh9wvA48hKDACxL+wo6mimoZA+zIkW+HCYG g+aDIIq+lIK4YCEce4lN7kYBrm0OnQN2Qd0WCbtZHbIxgrRqxuUsRcCmlIXcV5GgP1QZ ws2VGU6vh5dB2TJVhoSZr3KFzf+mMyUta9H/aODRUVfzSv+r7m9y+BPX5BoQ1C2gR+Ix bIBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716685832; x=1717290632; h=mime-version:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NczHZs+5EoObwep2pjAzs8VcNW/voWK1kjZSLw707n4=; b=ZRoMZyoSNRSEaoFqq/UrZzQgon3JW+2JvXBGh+HmFn/MS8qmyWsow5y+bBnIbVnVDJ 4CT0+dQrQOw6hzT+7jC2bZRn4DBLgNsZR8Y0ZPNismtjNHTm7yveqeolK0WRo3KpF7jG 9GvzLHjx8omNVKLUvz5rHaWwnFpET2UEUJjcGkReAk8NsfrFEDJg7qhCC4ceZC1KgMSF E1xXUgl1kBaEPoYXW6fzZHOzB8lFh7qVnLpRw0YLB5/AaCyOy1q6IFBV9M1PsAH79D8v 7gAzivxknSi8bC9iXGbzuhb2WlhVWB+461HpKWuIEhPmyTDDk0lyPh8O7Bb1ukoraJFD vK2Q== X-Forwarded-Encrypted: i=1; AJvYcCUHwlUTDO4kDrCQsoCDpW8zvdnGtIiOAuJpqwHbt5zgXHhi5RofDVAWpKuCfVAAD4dz0VfE7AH7RrIIH3SL9KTx2WbGCm5m6Pvqjg== X-Gm-Message-State: AOJu0YwbHlEu36OkABtE/KWR9OR415GO8McmK8NkLKH/xNbi3rOmEs1j 10OHsM28r3QXgzcR1dyxiQZ3CHhMQiFBADCkXw52XbVSAbnqn13Pbausvg== X-Google-Smtp-Source: AGHT+IG6eUox8szugdYzCuRER90m915YUPy99Qi4udy5QADmhccqp80LQFFplj4seK8nzvyIP2q9IA== X-Received: by 2002:a05:6a21:4984:b0:1af:fcbf:df27 with SMTP id adf61e73a8af0-1b212e65bb9mr6166780637.59.1716685831805; Sat, 25 May 2024 18:10:31 -0700 (PDT) Original-Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6fd710944b2sm1328390b3a.65.2024.05.25.18.10.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 18:10:31 -0700 (PDT) In-Reply-To: <86zfsf1cra.fsf@gnu.org> 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:285918 Archived-At: --Multipart_Sun_May_26_10:10:27_2024-1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Eli Zaretskii wrote: >=20 > > Date: Fri, 24 May 2024 22:54:46 +0900 > > From: kobarity > > Cc: andreas.roehler@easy-emacs.de, > > sunlin7.mail@gmail.com, > > 71093@debbugs.gnu.org > >=20 > > Eli Zaretskii wrote: > > > > Date: Fri, 24 May 2024 21:17:39 +0900 > > > > From: kobarity > > > > Cc: Andreas R=F6hler , Lin > > > > Sun , 71093@debbugs.gnu.org > > > >=20 > > > > Eli Zaretskii wrote: > > > > >=20 > > > > > > Date: Tue, 21 May 2024 12:47:57 +0200 > > > > > > From: Andreas R=F6hler > > > > > >=20 > > > > > > a =3D b =3D c =3D 5 > > > > > >=20 > > > > > > b and c are not fontified > > > > >=20 > > > > > Can someone please look into fixing this? python-ts-mode does TR= T, > > > > > btw. > > > >=20 > > > > Sorry, this bug was introduced by my commit > > > > 4915ca5dd4245a909c046e6691e8d4a1919890c8. I canceled it in commit > > > > 6b2c8dc9050c5c0514fa404733ce1d4a37d00e39 due to a performance issue, > > > > but the cancellation was incomplete. Attached is the patch to fix > > > > this in master with an ERT. Is it better to fix in emacs-29? > > >=20 > > > Thanks. If the regression was in Emacs 29, then yes, it is better to > > > fix that on the emacs-29 branch. > >=20 > > Attached is the patch for emacs-29 branch. >=20 > Thanks, installed on the emacs-29 branch, and closing the bug. Thanks, but there seems to be a problem with the merge to master. Could you apply the attached patch to master? --Multipart_Sun_May_26_10:10:27_2024-1 Content-Type: application/octet-stream; type=patch; name="0001-Fix-merge-error.patch" Content-Disposition: attachment; filename="0001-Fix-merge-error.patch" Content-Transfer-Encoding: 7bit >From 65b11fb8b16aa8e87ffbd497ba3b7d0cd2dcf18c Mon Sep 17 00:00:00 2001 From: kobarity Date: Sun, 26 May 2024 09:56:29 +0900 Subject: [PATCH] ; Fix merge error --- lisp/progmodes/python.el | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 79e383a1c1a..fea52b2f7d6 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -800,8 +800,7 @@ python-font-lock-keywords-maximum-decoration ;; c: Collection = {1, 2, 3} ;; d: Mapping[int, str] = {1: 'bar', 2: 'baz'} (,(python-font-lock-assignment-matcher - (python-rx (or line-start ?\;) (* space) - grouped-assignment-target (* space) + (python-rx grouped-assignment-target (* space) (? ?: (* space) (group (+ not-simple-operator)) (* space)) (group assignment-operator))) (1 font-lock-variable-name-face) @@ -845,17 +844,6 @@ python-font-lock-keywords-maximum-decoration (match-beginning 2)) ; limit the search until the assignment nil (1 font-lock-variable-name-face))) - ;; single assignment with type hints, e.g. - ;; a: int = 5 - ;; b: Tuple[Optional[int], Union[Sequence[str], str]] = (None, 'foo') - ;; c: Collection = {1, 2, 3} - ;; d: Mapping[int, str] = {1: 'bar', 2: 'baz'} - (,(python-font-lock-assignment-matcher - (python-rx grouped-assignment-target (* space) - (? ?: (* space) (+ not-simple-operator) (* space)) - (group assignment-operator))) - (1 font-lock-variable-name-face) - (2 'font-lock-operator-face)) ;; special cases ;; (a) = 5 ;; [a] = 5, -- 2.34.1 --Multipart_Sun_May_26_10:10:27_2024-1--