unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Colin Woodbury <colin@fosskers.ca>
To: 54345@debbugs.gnu.org
Subject: bug#54345: [PATCH] Account for new Python 3.10 keywords
Date: Fri, 11 Mar 2022 15:28:30 -0800	[thread overview]
Message-ID: <87tuc42hkq.fsf@fosskers.ca> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 100 bytes --]

I noticed these keywords unhighlighted even on `master`, and this patch fixes that.

Cheers,

Colin

[-- Attachment #1.2: Type: text/html, Size: 1126 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-progmodes-python.el-Account-for-new-keywords.patch --]
[-- Type: text/x-patch, Size: 852 bytes --]

From a20b88001800a89821680ce6b93eb7aed887f325 Mon Sep 17 00:00:00 2001
From: Colin Woodbury <colin@fosskers.ca>
Date: Fri, 11 Mar 2022 15:17:12 -0800
Subject: [PATCH] * lisp/progmodes/python.el: Account for new keywords.

As of Python 3.10, Python has structured pattern matching. This adds two
new keywords which need to be highlighted.
---
 lisp/progmodes/python.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index d83290fe45..c4d8b123a8 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -563,6 +563,8 @@ class declarations.")
           ;; Python 3.5+ PEP492
           (and "async" (+ space) (or "def" "for" "with"))
           "await"
+          ;; Python 3.10+
+          "match" "case"
           ;; Extra:
           "self")
          symbol-end)
-- 
2.35.1


             reply	other threads:[~2022-03-11 23:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 23:28 Colin Woodbury [this message]
2022-03-12 17:47 ` bug#54345: [PATCH] Account for new Python 3.10 keywords Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87tuc42hkq.fsf@fosskers.ca \
    --to=colin@fosskers.ca \
    --cc=54345@debbugs.gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).