all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: kobarity <kobarity@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: andreas.roehler@easy-emacs.de, sunlin7.mail@gmail.com,
	71093-done@debbugs.gnu.org
Subject: bug#71093: 30.0.50; python: multiple assignments not fontified
Date: Sun, 26 May 2024 10:10:27 +0900	[thread overview]
Message-ID: <eke7wmnhz8cc.wl-kobarity@gmail.com> (raw)
In-Reply-To: <86zfsf1cra.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]

Eli Zaretskii wrote:
> 
> > Date: Fri, 24 May 2024 22:54:46 +0900
> > From: kobarity <kobarity@gmail.com>
> > 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 <kobarity@gmail.com>
> > > > Cc: Andreas Röhler <andreas.roehler@easy-emacs.de>,	Lin
> > > >  Sun <sunlin7.mail@gmail.com>,	71093@debbugs.gnu.org
> > > > 
> > > > Eli Zaretskii wrote:
> > > > > 
> > > > > > Date: Tue, 21 May 2024 12:47:57 +0200
> > > > > > From: Andreas Röhler <andreas.roehler@easy-emacs.de>
> > > > > > 
> > > > > > 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.

Thanks, but there seems to be a problem with the merge to master.
Could you apply the attached patch to master?

[-- Attachment #2: 0001-Fix-merge-error.patch --]
[-- Type: application/octet-stream, Size: 1770 bytes --]

From 65b11fb8b16aa8e87ffbd497ba3b7d0cd2dcf18c Mon Sep 17 00:00:00 2001
From: kobarity <kobarity@gmail.com>
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


  reply	other threads:[~2024-05-26  1:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21 10:47 bug#71093: 30.0.50; python: multiple assignments not fontified Andreas Röhler
2024-05-23 13:12 ` Eli Zaretskii
2024-05-24 12:17   ` kobarity
2024-05-24 12:46     ` Eli Zaretskii
2024-05-24 13:54       ` kobarity
2024-05-24 14:54         ` Eli Zaretskii
2024-05-26  1:10           ` kobarity [this message]
2024-05-26  8:21             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eke7wmnhz8cc.wl-kobarity@gmail.com \
    --to=kobarity@gmail.com \
    --cc=71093-done@debbugs.gnu.org \
    --cc=andreas.roehler@easy-emacs.de \
    --cc=eliz@gnu.org \
    --cc=sunlin7.mail@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.