From debbugs-submit-bounces@debbugs.gnu.org Tue May 21 06:48:12 2024 Received: (at submit) by debbugs.gnu.org; 21 May 2024 10:48:12 +0000 Received: from localhost ([127.0.0.1]:48495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9N2S-00078v-HJ for submit@debbugs.gnu.org; Tue, 21 May 2024 06:48:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:55758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9N2P-00078p-Qa for submit@debbugs.gnu.org; Tue, 21 May 2024 06:48:11 -0400 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 1s9N2K-0004bT-6H for bug-gnu-emacs@gnu.org; Tue, 21 May 2024 06:48:04 -0400 Received: from mout.kundenserver.de ([212.227.17.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9N2H-0006we-FX for bug-gnu-emacs@gnu.org; Tue, 21 May 2024 06:48:03 -0400 Received: from [192.168.178.61] ([89.247.171.239]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MDhth-1sHrUf1YJD-00AmNu for ; Tue, 21 May 2024 12:47:58 +0200 Message-ID: Date: Tue, 21 May 2024 12:47:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: bug-gnu-emacs@gnu.org From: =?UTF-8?Q?Andreas_R=C3=B6hler?= Subject: 30.0.50; python: multiple assignments not fontified Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:Mu9hDS9uKQm1wekl7OtTFyi1F5FmDCFTyLNLrrRGLv4WXf/fJop m+SBJRzgeKhMPz8SahY9sOlxfz1MXNKnr6NyidaEEg6nX7X7MNbO5GdyZ9tH6VTxz53HOoW fSz+RO5ZI+jWsXMnjimcw4Vt+yvwZ1lnn7j6+U9ZucNdGTf+ImHH9U1iQytG2of//9Fq2DP BUv9vDeVW0S9E0GP7v7lQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:tO7xj7fB98M=;OIbUFQbCc8i4sZkRMsG27XgeltO I+LSIEVVZrK0HyM+kDfUruPaYmGQrCqKMqF454U+fOkJgnp6SmAZy3KY2yHcCHRytmjE1zdw7 JuGqL0qNWRwKFCSPtTDlRU2lSYt/xtiZ8qKKYvHxbgpZ+i0k3VkUzqqFB6WWWCnvsOx/j91Ru kGsoia2PkSyHWGIXk44do5IzfXPz+Yu9XVZkols7b0kJdUsQ5Vr1XG0cObFImaB8bUtZ1yXzt 77YY6bdOQSjYjIpLRvy/5qcWtoXcLPBsygS4CK4FAv0DF2ZgTc1ojDc/PrhefIfuEkaEOm+Jy CHOfrJSSno4Neh8f/IqgphVz0Za6yJhiE9yBT0rA9sIOHQ/ztt3SdB0FFpPTvESZ1Ig9YEiHk 6dFdHIUDSlJ73U0nKWBYJCFxubbTr566k+xH63dQnbXzSaKit/6/UjKb3/CwT+VFzSdngaJ9/ P+zIXtKIzplJJYcOTuRe8Xae0QEn/Uq8VtBDeL1e/VV+OmSXwmYVr7Lw+N9tFQgKiW/wSk4wY mkTQi+q/saf3NndrwX9g5T2PoyRWVp6q5hhF4g9ni/tXyjmMgHCtqCEDx0gtYJRdxM6mC0QE2 jP89c9P/AQYuSsL2gYiOhJQNG417AdOw2n+Iv04EbdbUaSET4t2e5mD+Sd41P+UsUBZoh6MgH +pE9st3u5FFgwADeaH71Tp+RWdA53J7AQcM4SM5XxL/HanptFMIvFmxHz4OHu3slWqBPINZYU qS2361ZanJV6/GIRkLYeFNRzlNalLjlloEpslIZLG97KgOqencWkkQ= Received-SPF: pass client-ip=212.227.17.24; envelope-from=andreas.roehler@easy-emacs.de; helo=mout.kundenserver.de X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: a = b = c = 5 b and c are not fontified GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2024-05-21 Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [89.247.171.239 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: a = b = c = 5 b and c are not fontified GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2024-05-21 Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [89.247.171.239 listed in zen.spamhaus.org] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager a = b = c = 5 b and c are not fontified GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2024-05-21 From debbugs-submit-bounces@debbugs.gnu.org Thu May 23 09:13:20 2024 Received: (at 71093) by debbugs.gnu.org; 23 May 2024 13:13:20 +0000 Received: from localhost ([127.0.0.1]:59055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA8G0-0002WE-Ct for submit@debbugs.gnu.org; Thu, 23 May 2024 09:13:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA8Fy-0002W6-AX for 71093@debbugs.gnu.org; Thu, 23 May 2024 09:13:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA8Ff-00075G-Ql; Thu, 23 May 2024 09:13:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=AgycGT/jm7hNBGdXidR2lsFeYybRTtua1VDgmkq0i0Y=; b=KaspEMzNUkHP/Uw1VCm6 C+bkDFil0Oavbinsl6mKN9bFLW3qz5Z1BqINEtp+V4D9QGGhs9Bz14Ccdc5O3nFDHjExJaN4SAFsq VtwZpbSVpJPTB4Htv0qfFEzNsGSmaqFWdEJnze36vmvzrg5vB/Uty/piaVZiTwEPdwNO1LhMrsFVB 07gpgsKkXwzc0RU2T5BH58FdFAT89ciu6V961W451BKdnFckNIbJYN77m/WqCkJHGdGl2+yCjo/3Q JmWDXWLgWuN46YZM2XTbTKySPTT4xDdSe2M6ra1RaNMakSauHAd8RV37Rg1Xs7QyNOSPTwJgWbrT6 ETneUtSqhCwUFA==; Date: Thu, 23 May 2024 16:12:57 +0300 Message-Id: <86h6eo4qp2.fsf@gnu.org> From: Eli Zaretskii To: Andreas =?utf-8?Q?R=C3=B6hler?= , kobarity , Lin Sun In-Reply-To: (message from Andreas =?utf-8?Q?R=C3=B6hler?= on Tue, 21 May 2024 12:47:57 +0200) Subject: Re: bug#71093: 30.0.50; python: multiple assignments not fontified References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71093 Cc: 71093@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 21 May 2024 12:47:57 +0200 > From: Andreas Röhler > > a = b = c = 5 > > b and c are not fontified Can someone please look into fixing this? python-ts-mode does TRT, btw. From debbugs-submit-bounces@debbugs.gnu.org Fri May 24 08:19:23 2024 Received: (at 71093) by debbugs.gnu.org; 24 May 2024 12:19:23 +0000 Received: from localhost ([127.0.0.1]:36853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sATtI-0004b9-Vi for submit@debbugs.gnu.org; Fri, 24 May 2024 08:19:23 -0400 Received: from mail-il1-f180.google.com ([209.85.166.180]:56341) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sATtG-0004az-7X for 71093@debbugs.gnu.org; Fri, 24 May 2024 08:19:20 -0400 Received: by mail-il1-f180.google.com with SMTP id e9e14a558f8ab-36dd6110186so27266365ab.0 for <71093@debbugs.gnu.org>; Fri, 24 May 2024 05:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716553085; x=1717157885; 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=IpNwvQtF0h+iVeZWjIMjB7jfoCSEcgzhcHBbVP2Q8po=; b=DtE6qkwl0eHQjkw36Tf6LTE/e1u7hP7jRDCxNDQOWamQlxdY5/R2MZS1JfntGkSQTq x8ZPuY1m3aXC/nii15kBKpFnLjUMjSzmhoU2JYO45tBdvQ1Ki6eg824pFzpkg88QHEpm QZXehCqDrwkuy/+W2nVVMWWQgQVdmrOzRnTlnwdc6PuTDv0lW8ePDj+NsOj8Pn1Kery+ SE2nGwSWpWc5yTCVqj3iHuTadH5Qm8L8B7fWYvqVPM3+tpQgEJRuBEgvIcQlNJMtc0uu sUA/mqGADGiFOHPEtVI4LJtRKn1um+Z8THe80IXuK5c744D35/DJCLoILdec0ZfYE0Ab 2SWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716553085; x=1717157885; 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=IpNwvQtF0h+iVeZWjIMjB7jfoCSEcgzhcHBbVP2Q8po=; b=vwufsFnOiv1OkLScQCixgmGgfjZ4PO+eQw07di41lbsiudUZDRgcSRwMG31DU2kNq+ i9o2sZJPqHl7Pt+hSO4nRaXI17Pj/itT43cods4+WLA3A/t24Q3DYxsWxb3E2DvqYlJT 2988WSoFdK7jKaFZ1yXcNjJTE4ZLKDHMFkY0d4BrflT0JoGDsgN4MPFR4G6FiEdp+kTq 0ivb0kfkdXGg5qOtnCQsAVjNwzoQERSkKxc6VhZQa/Pkn4ONdIPLHHEvILDu0OO7FnUX EPdnJhF8hINT8WaLo3/kFVzjzvEpzFMcM6VRwhGzdFlTrtCPuVP8RuuGqPNz5O8RynNU PCYQ== X-Forwarded-Encrypted: i=1; AJvYcCWxMk5gLPmo0xLvRm1RpW8t5TnDyQzdOhIPeeBiH7dVYkeVs7MsNon+5OOsQEZhSfyQr3uvC3ih5bF9HxN/Wy7mbNoMmDI= X-Gm-Message-State: AOJu0YxvLL5I+hLNLFDVvSwgjW/UEp5RJU995SUDCK+7gXofplvI2mgW BaJGMTWwarZYRLhRcWVTGhOs6+AmDJud7gg9kLVZg9rYH1FqIEUQ X-Google-Smtp-Source: AGHT+IHhnuGfL1fPdXNrpIA4W11DuanrhpfuuqgFwWjoHQsMr96VeGGIznYc0p5O4kTxbCyj0vVk2w== X-Received: by 2002:a92:c561:0:b0:36c:4aba:10be with SMTP id e9e14a558f8ab-3737b2c588fmr25150555ab.10.1716553085446; Fri, 24 May 2024 05:18:05 -0700 (PDT) Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6822073fbf4sm1028808a12.6.2024.05.24.05.18.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 05:18:04 -0700 (PDT) Date: Fri, 24 May 2024 21:17:39 +0900 Message-ID: From: kobarity To: Eli Zaretskii Subject: Re: bug#71093: 30.0.50; python: multiple assignments not fontified In-Reply-To: <86h6eo4qp2.fsf@gnu.org> References: <86h6eo4qp2.fsf@gnu.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: multipart/mixed; boundary="Multipart_Fri_May_24_21:17:38_2024-1" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71093 Cc: Andreas =?ISO-8859-1?Q?R=F6hler?= , Lin Sun , 71093@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Multipart_Fri_May_24_21:17:38_2024-1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 TRT, > btw. 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? --Multipart_Fri_May_24_21:17:38_2024-1 Content-Type: application/octet-stream; type=patch; name="0001-Fix-Python-font-lock-of-chained-assignment-statement.patch" Content-Disposition: attachment; filename="0001-Fix-Python-font-lock-of-chained-assignment-statement.patch" Content-Transfer-Encoding: 7bit >From 0476507cc1fb77217fe051f6261c9a9a1d38243c Mon Sep 17 00:00:00 2001 From: kobarity Date: Fri, 24 May 2024 21:00:59 +0900 Subject: [PATCH] Fix Python font lock of chained assignment statement * lisp/progmodes/python.el (python-font-lock-keywords-maximum-decoration): Allow chaining of single assignment statements. * test/lisp/progmodes/python-tests.el (python-font-lock-assignment-statement-20): New test. (Bug#71093) --- lisp/progmodes/python.el | 3 +-- test/lisp/progmodes/python-tests.el | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 360936c9efd..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) diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index b19c5c31f16..de6a4316758 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -502,6 +502,16 @@ python-font-lock-assignment-statement-19 (31 . font-lock-type-face) (40) (43 . font-lock-operator-face) (44)))) +(ert-deftest python-font-lock-assignment-statement-20 () + (python-tests-assert-faces + "a = b = c = 1" + '((1 . font-lock-variable-name-face) (2) + (3 . font-lock-operator-face) (4) + (5 . font-lock-variable-name-face) (6) + (7 . font-lock-operator-face) (8) + (9 . font-lock-variable-name-face) (10) + (11 . font-lock-operator-face) (12)))) + (ert-deftest python-font-lock-operator-1 () (python-tests-assert-faces "1 << 2 ** 3 == +4%-5|~6&7^8%9" -- 2.34.1 --Multipart_Fri_May_24_21:17:38_2024-1-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 24 08:49:06 2024 Received: (at 71093) by debbugs.gnu.org; 24 May 2024 12:49:06 +0000 Received: from localhost ([127.0.0.1]:37008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAUM6-0004tI-E3 for submit@debbugs.gnu.org; Fri, 24 May 2024 08:49:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAUM3-0004sv-Ph for 71093@debbugs.gnu.org; Fri, 24 May 2024 08:49:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAUJl-0007Np-Er; Fri, 24 May 2024 08:46:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=+AGWhtLtv+q1vam3Du0+SdlYqLhoygkF4PNqh4rwUxc=; b=k3bIMXaFj6RzhUSq8pMm DLTo0/SkW2bJ1vTyNPuwQUU4E1ilGL2R38BEDGQxL2AB+2GjY5lj/mNE3v8xHBvWJhX0c2AIw9nic zylQ5uqxqBdgP439aB4XKfg1XZl5nRMRTdov3ku1IIsVdW9uAEbJiItOvbx2iSb/N08RrJAIXSBkX 7Fx9akI2X5hyWnJKYIuV7ErPxUjfbeh8MgiRCMV+6cUEJgZzm5SAUFPStpJXhWyRdAek7d22YBOj6 Sgekxxeq74Z5nlA9NdJXZTRmjxokQp4Z3XDlTI6aF0tXo4PbQPw2PORwA61shoTvHMLahO2arNzL7 /5Ya8R/PmPGsnw==; Date: Fri, 24 May 2024 15:46:30 +0300 Message-Id: <864jan2x95.fsf@gnu.org> From: Eli Zaretskii To: kobarity In-Reply-To: (message from kobarity on Fri, 24 May 2024 21:17:39 +0900) Subject: Re: bug#71093: 30.0.50; python: multiple assignments not fontified References: <86h6eo4qp2.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71093 Cc: andreas.roehler@easy-emacs.de, sunlin7.mail@gmail.com, 71093@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Fri, 24 May 2024 21:17:39 +0900 > From: kobarity > Cc: Andreas Röhler , Lin > Sun , 71093@debbugs.gnu.org > > Eli Zaretskii wrote: > > > > > Date: Tue, 21 May 2024 12:47:57 +0200 > > > From: Andreas Röhler > > > > > > a = b = c = 5 > > > > > > b and c are not fontified > > > > Can someone please look into fixing this? python-ts-mode does TRT, > > btw. > > 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? Thanks. If the regression was in Emacs 29, then yes, it is better to fix that on the emacs-29 branch. From debbugs-submit-bounces@debbugs.gnu.org Fri May 24 09:56:06 2024 Received: (at 71093) by debbugs.gnu.org; 24 May 2024 13:56:06 +0000 Received: from localhost ([127.0.0.1]:37287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAVOv-0008Mt-P6 for submit@debbugs.gnu.org; Fri, 24 May 2024 09:56:06 -0400 Received: from mail-pf1-f182.google.com ([209.85.210.182]:48205) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAVOu-0008MW-Di for 71093@debbugs.gnu.org; Fri, 24 May 2024 09:56:05 -0400 Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-6f850ff30c0so1507867b3a.0 for <71093@debbugs.gnu.org>; Fri, 24 May 2024 06:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716558891; x=1717163691; 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=+J4LTnzPe25dhAe9yLHpnKveFhAjfgGr7w9IefwRYPw=; b=bP/Ka+x5laRvlvGBxzC3BQWX1l2WKbSg4SuEKpcwCbiGABiCALg1j/pM2GpPJw6xBQ 5AxqP5xDy2aF18q189KF1WdYVAONHc0KTgpK+fnUXVC/ENpM8pUjAd5B1C9rLHM6Khs+ B7vq2gDkpVKwFhLjxICQsS+zbUYxBtvhCEWO4VuBoPGqVBxBwlSnPqPaWClxN6b2Xyab yyGFfSapfaD01GfrddQj/F4OaxMcpmDWgn2vNJT1mQ0cA6TMZBcjE1TgVXesLWkZ29yb PaF2K1L56dfFu2x/Xkp95PCM2OnBliLh++VdGvTRD7ZtROwLl0BAXJrbkrfeeVPcTlXV lJ1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716558891; x=1717163691; 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=+J4LTnzPe25dhAe9yLHpnKveFhAjfgGr7w9IefwRYPw=; b=TAcUlES04ND6SMF1zZUz0yJGv2cGR3PAX5YOEI9IFTmpEM293Y93LPoQ56zHCzAxrj eh6B8b0nZr2GGLvDBfU6atwZ7zVezwpeD5EFacpM10vwwIEg7BIZvWHPU6wut27GpDCp xbbj5xQM7ipbCXiLhPUffO+xB2QvAeJHhr+ziKiJAJekZdih7LClUyvxGQowwermOUoY jtHbtmVEHVAXpcWwANR1nLN/vitMKsf353bb3B+vQm6tcJ9ttYDbzo5fgPo6wFJDyQX1 Wa3WY91rE6GbrBIcHUgRHkiXSdS5xXVb06fyBt5cftxE5yXvDpgPh95oaeF/kf6jZYvF FM+A== X-Forwarded-Encrypted: i=1; AJvYcCWnDFJztQCCznUIY2x0RGJfsXqTaMTPlUKTlf4hrbaeBHHTtGm1iumBsCCGJV+eiwhDe+VtDtMqXK3hMMQ5T/mqUkfCu54= X-Gm-Message-State: AOJu0YyR1Oh4nhry3eEugTpYsz0tCv0OjH/60dXvmpQ6hxIRTUvVxVKa pERX+mjSQj4VHATWATtr6qvvgZbVOf702yPJN98EWtmpQxpi4LAX X-Google-Smtp-Source: AGHT+IFTys6h3euAxsJ6ItwNaXLjTsJllkoaqc37wey3JGuE6+JEeU2xVu9lWM0FSEr11awuU7Fbiw== X-Received: by 2002:a05:6a20:9716:b0:1ac:8824:156f with SMTP id adf61e73a8af0-1b212d4a413mr2336343637.33.1716558891118; Fri, 24 May 2024 06:54:51 -0700 (PDT) Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c9ce8dbsm14015455ad.285.2024.05.24.06.54.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 06:54:50 -0700 (PDT) Date: Fri, 24 May 2024 22:54:46 +0900 Message-ID: From: kobarity To: Eli Zaretskii Subject: Re: bug#71093: 30.0.50; python: multiple assignments not fontified In-Reply-To: <864jan2x95.fsf@gnu.org> References: <86h6eo4qp2.fsf@gnu.org> <864jan2x95.fsf@gnu.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: multipart/mixed; boundary="Multipart_Fri_May_24_22:54:46_2024-1" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71093 Cc: andreas.roehler@easy-emacs.de, sunlin7.mail@gmail.com, 71093@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Multipart_Fri_May_24_22:54:46_2024-1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 TRT, > > > 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. Attached is the patch for emacs-29 branch. --Multipart_Fri_May_24_22:54:46_2024-1 Content-Type: application/octet-stream; type=patch; name="0001-Fix-Python-font-lock-of-chained-assignment-statement.patch" Content-Disposition: attachment; filename="0001-Fix-Python-font-lock-of-chained-assignment-statement.patch" Content-Transfer-Encoding: 7bit >From 1af361a25b2ecd84f6731421eb373b5f28f3b4a1 Mon Sep 17 00:00:00 2001 From: kobarity Date: Fri, 24 May 2024 22:50:12 +0900 Subject: [PATCH] Fix Python font lock of chained assignment statement * lisp/progmodes/python.el (python-font-lock-keywords-maximum-decoration): Allow chaining of single assignment statements. * test/lisp/progmodes/python-tests.el (python-font-lock-assignment-statement-20): New test. (Bug#71093) --- lisp/progmodes/python.el | 3 +-- test/lisp/progmodes/python-tests.el | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 02588d756e9..051f198e192 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -812,8 +812,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) (+ not-simple-operator) (* space)) (group assignment-operator))) (1 font-lock-variable-name-face) diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 95db93dd5cc..06943e22f5b 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -474,6 +474,16 @@ python-font-lock-assignment-statement-18 (136 . font-lock-operator-face) (137) (144 . font-lock-keyword-face) (150)))) +(ert-deftest python-font-lock-assignment-statement-20 () + (python-tests-assert-faces + "a = b = c = 1" + '((1 . font-lock-variable-name-face) (2) + (3 . font-lock-operator-face) (4) + (5 . font-lock-variable-name-face) (6) + (7 . font-lock-operator-face) (8) + (9 . font-lock-variable-name-face) (10) + (11 . font-lock-operator-face) (12)))) + (ert-deftest python-font-lock-escape-sequence-string-newline () (python-tests-assert-faces "'\\n' -- 2.34.1 --Multipart_Fri_May_24_22:54:46_2024-1-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 24 10:54:53 2024 Received: (at 71093-done) by debbugs.gnu.org; 24 May 2024 14:54:53 +0000 Received: from localhost ([127.0.0.1]:37562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAWJo-0000XS-NQ for submit@debbugs.gnu.org; Fri, 24 May 2024 10:54:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAWJl-0000XM-Vm for 71093-done@debbugs.gnu.org; Fri, 24 May 2024 10:54:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAWJZ-0008FN-AM; Fri, 24 May 2024 10:54:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ixav3/jTznLF+08H6lNTJpdsuPTzDLGZytQ3MZt9yDA=; b=DJU/IjPD/7wTww453bpC smOhc2dQlsL8exODZtDiMDVu8VPXDmLUJDozCNpdVwMQAA8VToYC2fT0Kacnd8VBp0TA0VOokm7nz YC25TbDfhhRT0ZqGl54SkrTqn6Poie+tBzsx8xnN18bPdvNoDqYNRZOZ1oBJwadP2CUFDMI5ERXlw SmSM6E/lAU8X9xJc+dEPVHPjSAyA0cbrGYaLP2MnZ1nPvqIKmIzlggEDHgvIAHMVrE/xp0qyISQgV h1seSJ2rb1JmXyO3TBZyE4pahDK1LNUkcuOe6WVevYtxOy+pLr87RA+n8zUZtmVAmjDu2D8Ev/4me vWlPTUUQWJYT3g==; Date: Fri, 24 May 2024 17:54:33 +0300 Message-Id: <86zfsf1cra.fsf@gnu.org> From: Eli Zaretskii To: kobarity In-Reply-To: (message from kobarity on Fri, 24 May 2024 22:54:46 +0900) Subject: Re: bug#71093: 30.0.50; python: multiple assignments not fontified References: <86h6eo4qp2.fsf@gnu.org> <864jan2x95.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71093-done Cc: andreas.roehler@easy-emacs.de, sunlin7.mail@gmail.com, 71093-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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 > > Eli Zaretskii wrote: > > > Date: Fri, 24 May 2024 21:17:39 +0900 > > > From: kobarity > > > Cc: Andreas Röhler , Lin > > > Sun , 71093@debbugs.gnu.org > > > > > > Eli Zaretskii wrote: > > > > > > > > > Date: Tue, 21 May 2024 12:47:57 +0200 > > > > > From: Andreas Röhler > > > > > > > > > > a = b = c = 5 > > > > > > > > > > b and c are not fontified > > > > > > > > Can someone please look into fixing this? python-ts-mode does TRT, > > > > btw. > > > > > > 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? > > > > Thanks. If the regression was in Emacs 29, then yes, it is better to > > fix that on the emacs-29 branch. > > Attached is the patch for emacs-29 branch. Thanks, installed on the emacs-29 branch, and closing the bug. From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 03:03:05 2024 Received: (at control) by debbugs.gnu.org; 25 May 2024 07:03:05 +0000 Received: from localhost ([127.0.0.1]:41594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAlQm-0003bv-IX for submit@debbugs.gnu.org; Sat, 25 May 2024 03:03:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAlQg-0003bR-IQ; Sat, 25 May 2024 03:02:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAlQT-00069t-CX; Sat, 25 May 2024 03:02:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=9WKpn4YarEQsKlGBYwVAQ/oVkKc3NpXej6REwUGO8Lo=; b=TvkcJ9Oe4KLqIOdVOigt 7Ox0pcWBvlgZ/aVJ6XwzZtciuJpDjxm4Q/KY2oxbYPLxY5RnV4L+sd2CrCMrjmEF3eqvx/X8A0eht VggabB5MI+/hccRhhefEvRRluztZnybPBxC6jn6hW124DByPoeFZ84FBJUkC+3zWWBvO1TtglXR16 8/Hk105uxktNPoQutHE1OtuMhL2GydqOWPqeD9Ai7/yYikUrub2x9RpHHr9h4G8nDlQJ9IseweiGq 0Kr0v9I96Rpsp6kowy2ywJlV02o2lhVVF7KCmPt+pLjOxWE2lW1K0RLim1EB4MvOOJJt3TA1y6ca7 PDQ+NfW8cp3cmg==; Date: Sat, 25 May 2024 10:02:43 +0300 Message-Id: <86ikz21ii4.fsf@gnu.org> From: Eli Zaretskii To: Andreas =?utf-8?Q?R=C3=B6hler?= In-Reply-To: <63ac8d89-3126-4fb8-a162-6a65ac5deb37@easy-emacs.de> (message from Andreas =?utf-8?Q?R=C3=B6hler?= on Sat, 25 May 2024 08:47:57 +0200) Subject: Re: bug#71189: 30.0.50; python: multiple assignments still not fontified References: <63ac8d89-3126-4fb8-a162-6a65ac5deb37@easy-emacs.de> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control Cc: 71189@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) forcemerge 71189 71093 close 71189 thanks > Date: Sat, 25 May 2024 08:47:57 +0200 > From: Andreas Röhler > > a = b = c = 5 > > b and c are not fontified > > GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, > cairo version 1.16.0) of 2024-05-25 This is an exact duplicate of bug#71093. That bug was fixed yesterday on the emacs-29 branch (because the original regression was in Emacs 29), so please wait until it gets merged to the master branch (hopefully, later today), before you submit new issues about that. In any case, please post to the original bug number, instead of creating new bug reports that are duplicates. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat May 25 21:11:49 2024 Received: (at 71093-done) by debbugs.gnu.org; 26 May 2024 01:11:49 +0000 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 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 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) 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) Date: Sun, 26 May 2024 10:10:27 +0900 Message-ID: From: kobarity To: Eli Zaretskii Subject: Re: bug#71093: 30.0.50; python: multiple assignments not fontified In-Reply-To: <86zfsf1cra.fsf@gnu.org> References: <86h6eo4qp2.fsf@gnu.org> <864jan2x95.fsf@gnu.org> <86zfsf1cra.fsf@gnu.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) 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" X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 71093-done Cc: andreas.roehler@easy-emacs.de, sunlin7.mail@gmail.com, 71093-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --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-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 26 04:22:17 2024 Received: (at 71093-done) by debbugs.gnu.org; 26 May 2024 08:22:17 +0000 Received: from localhost ([127.0.0.1]:38311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sB98z-000809-8S for submit@debbugs.gnu.org; Sun, 26 May 2024 04:22:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sB98x-0007zy-Kb for 71093-done@debbugs.gnu.org; Sun, 26 May 2024 04:22:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sB98k-0002Lv-AL; Sun, 26 May 2024 04:22:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ww0jzrvLzuruPFiUR9HM5cauvt2YsRQTXP4WY1sgsrU=; b=aw+Mp+fqaing nofxDXtBPpK1SQmughKYfeq3l6+j5awveUJpQhahOTByGMCDlLAu6m4kYAN2MSlsXk/mdTweoS9Xa rEJhUVC9g60qgnDtuwno1C5D4GCH3RCBt16FwdO9N5Su5axyZj/Wbd9Oo0DWMiIbUpgToUjRKnQYu cSakma5N6/Q98kR+4zM3gJRyknfP9n+NWdzo6lqWU//6PdbmMnwB+t1gDuAZXSv2JrJMhI7doiI9g KEYeVW/CRbOZ6zXFJJPEXBnAS1VgT4KdzvbEMIpI5gSxFpy1786YB0Qq2HbJAYLEtF2tvs1Tp6Pqm rqupFvUZoibxHyBI4evRbw==; Date: Sun, 26 May 2024 11:21:55 +0300 Message-Id: <861q5px9ss.fsf@gnu.org> From: Eli Zaretskii To: kobarity In-Reply-To: (message from kobarity on Sun, 26 May 2024 10:10:27 +0900) Subject: Re: bug#71093: 30.0.50; python: multiple assignments not fontified References: <86h6eo4qp2.fsf@gnu.org> <864jan2x95.fsf@gnu.org> <86zfsf1cra.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71093-done Cc: andreas.roehler@easy-emacs.de, sunlin7.mail@gmail.com, 71093-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 26 May 2024 10:10:27 +0900 > From: kobarity > Cc: andreas.roehler@easy-emacs.de, > sunlin7.mail@gmail.com, > 71093-done@debbugs.gnu.org > > > > Attached is the patch for emacs-29 branch. > > > > 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? Thanks, done. From unknown Mon Jun 23 02:24:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 23 Jun 2024 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator