From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Noah Peart Newsgroups: gmane.emacs.bugs Subject: bug#70718: [PATCH] Add font-locking for for_statement variable in python-ts-mode Date: Thu, 2 May 2024 07:10:35 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000662d720617792b8f" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35861"; mail-complaints-to="usenet@ciao.gmane.io" To: 70718@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 02 16:11:58 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 1s2XAD-00098w-TK for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 May 2024 16:11:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2XA0-0001IG-La; Thu, 02 May 2024 10:11:44 -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 1s2X9x-0001H6-5m for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 10:11:41 -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 1s2X9w-0006Pi-TW for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 10:11:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s2XAI-0006Ob-0u for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 10:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noah Peart Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 May 2024 14:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171465909324575 (code B ref -1); Thu, 02 May 2024 14:12:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 May 2024 14:11:33 +0000 Original-Received: from localhost ([127.0.0.1]:44037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2X9l-0006OJ-RK for submit@debbugs.gnu.org; Thu, 02 May 2024 10:11:33 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:56390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2X9h-0006OD-QH for submit@debbugs.gnu.org; Thu, 02 May 2024 10:11:28 -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 1s2X9G-0000tM-1H for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 10:10:58 -0400 Original-Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2X9B-00064a-LL for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 10:10:57 -0400 Original-Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-2390335b67cso2711066fac.0 for ; Thu, 02 May 2024 07:10:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714659047; x=1715263847; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=CkEpyC8dRG0wC81/eCIklnCsVwpaYkKY9f45qy1S/ic=; b=m1X7yBLCLBTdPRZDjJXHjrOzkTDbuaAJ7cl/rKHpTTmqTmJ/gNLEhobLYvHEcYg9M2 iiF14EWZkEwIHoXI5roZok3taC8twv2rO4biKOJvxDkAIfoJEhegkIDa+2B/nKVC2lYe fBc9Wbs7WpNRhix2M/xyBcjAD5jI9XN0vsMDP5uMybaCB2E6YNt+oaTBtOj5/YvgMcLc P23eXyzNZXifV3J3ICxK2pP30OLQir32CFOhWQaZGkbmHZQsUQCq//c18trBelkPJKM3 YXQkXveR8ek1O5CObt2oLwajsht65gqV2VkRtODPI00pOzPWyJQdT6J5FbSLbCUIINBw /eKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714659047; x=1715263847; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=CkEpyC8dRG0wC81/eCIklnCsVwpaYkKY9f45qy1S/ic=; b=tNIn1evjOoodpxOAI6/1NkohDnG+d2sEZSbJyISlcbH9u3BPjK+t25wjoEnaKL7mr8 ob0+KHTOBL525zLjhuGsxv5hxLF0lyy7c5Ch0NDgYQuJRC+7RSyHiUp5zUu5tWXv/Dku QGIrENTUvBSQ64bmbqvS7whkDOPVc6ITuAJotLSWxXXRE8uIkjsq2go3wdJY5AAhLiwR hjqppo5MlhriBOmlMfI4YyTJpehjFBSdtbifre3wXRgg8Mj2RusUk8TqLkvKyYdKaX93 ej3lkZVt4D0G7TgiNVEAyUQwuZI13j4We9RZDtD3a/oiE/o7mzPznD48HwvtlSj0afM5 ukKg== X-Gm-Message-State: AOJu0Yyf65S+9AonWwYm/hTidrOSOdJkCFX6eaW5hnWjfJ+8n208Sfah BJfStyHz7FFORLw1yW6pI+ddqW8/8XkN+OYUnyFt6pv4Dy1EezpvuiHYs2Vip2+vByfNjqZbPfj mTWK6s5m5Cx50hQBoAk4Ip+D5GPu8Xm4E0I/Z7g== X-Google-Smtp-Source: AGHT+IGdO9+HrLeISzit/gQVXWN6cg5dtkfAmOWToEpZyWKvPQok9P3WbFN6NzIg62z035FCTy9xENEH9yG3FZkvrTg= X-Received: by 2002:a05:6870:80d0:b0:22e:e01a:c7f7 with SMTP id r16-20020a05687080d000b0022ee01ac7f7mr6592831oab.16.1714659046850; Thu, 02 May 2024 07:10:46 -0700 (PDT) Received-SPF: pass client-ip=2001:4860:4864:20::36; envelope-from=noah.v.peart@gmail.com; helo=mail-oa1-x36.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:284327 Archived-At: --000000000000662d720617792b8f Content-Type: multipart/alternative; boundary="000000000000662d700617792b8d" --000000000000662d700617792b8d Content-Type: text/plain; charset="UTF-8" Tags: patch Adds font-locking for identifier in for_statement in python-ts-mode. This covers the simple case: for i in range(0) # ^ font-lock-variable-name-face In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2024-04-30 built on noah-X580VD Repository revision: c00105626ace43919706819da4057a358e62bafe Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Ubuntu 22.04.4 LTS Configured using: 'configure --prefix=/usr/local --with-modules --with-tree-sitter --with-threads --with-x-toolkit=gtk3 --with-xwidgets --with-gnutls --with-json --with-mailutils --with-jpeg --with-png --with-rsvg --with-tiff --with-xml2 --with-xpm --with-imagemagick CC=gcc-12 CXX=gcc-12' --000000000000662d700617792b8d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Tags: patch


Adds font-locking for identifier in= for_statement in python-ts-mode.

This covers the simple case:
<= br>
=C2=A0 =C2=A0 for i in range(0)
=C2=A0 =C2=A0 # =C2=A0 ^ font-lo= ck-variable-name-face



In GNU Emacs 30.0.50 (build 1, x86_64-= pc-linux-gnu, GTK+ Version
3.24.33, cairo version 1.16.0) of 2024-04-30 = built on noah-X580VD
Repository revision: c00105626ace43919706819da4057a= 358e62bafe
Repository branch: master
Windowing system distributor = 9;The X.Org Foundation', version 11.0.12101004
System Description: U= buntu 22.04.4 LTS

Configured using:
=C2=A0'configure --prefix= =3D/usr/local --with-modules --with-tree-sitter
--with-threads --with-x-= toolkit=3Dgtk3 --with-xwidgets --with-gnutls
--with-json --with-mailutil= s --with-jpeg --with-png --with-rsvg
--with-tiff --with-xml2 --with-xpm = --with-imagemagick CC=3Dgcc-12
CXX=3Dgcc-12'
--000000000000662d700617792b8d-- --000000000000662d720617792b8f Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Add-font-locking-for-for_statement-variable-in-pytho.patch" Content-Disposition: attachment; filename="0001-Add-font-locking-for-for_statement-variable-in-pytho.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lvpblvk30 RnJvbSAyMTY4YjJjNzg4MDU3ZDFkYTZmNWMzMzBhNDY1Y2RmYzFmOWU2NmYxI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kKICAgICAgKHBhdHRlcm5fbGlzdCBbKGlkZW50aWZpZXIpCiAgICAgICAgICAgICAg ICAgICAgIChsaXN0X3NwbGF0X3BhdHRlcm4gKGlkZW50aWZpZXIpKV0KICAgICAgICAgICAgICAg ICAgICBAZm9udC1sb2NrLXZhcmlhYmxlLW5hbWUtZmFjZSkKLS0gCjIuMzQuMQoK --000000000000662d720617792b8f--