unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54345: [PATCH] Account for new Python 3.10 keywords
@ 2022-03-11 23:28 Colin Woodbury
  2022-03-12 17:47 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Woodbury @ 2022-03-11 23:28 UTC (permalink / raw)
  To: 54345


[-- 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#54345: [PATCH] Account for new Python 3.10 keywords
  2022-03-11 23:28 bug#54345: [PATCH] Account for new Python 3.10 keywords Colin Woodbury
@ 2022-03-12 17:47 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-12 17:47 UTC (permalink / raw)
  To: Colin Woodbury; +Cc: 54345

Colin Woodbury <colin@fosskers.ca> writes:

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

Thanks; pushed to Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-12 17:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 23:28 bug#54345: [PATCH] Account for new Python 3.10 keywords Colin Woodbury
2022-03-12 17:47 ` Lars Ingebrigtsen

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).