From: Brian Leung <leungbk@posteo.net>
To: 67440@debbugs.gnu.org
Cc: Yuan Fu <casouri@gmail.com>
Subject: bug#67440: [PATCH] python: Add "is not" as an entry in python--treesit-keywords
Date: Sat, 25 Nov 2023 07:24:15 +0000 [thread overview]
Message-ID: <87a5r2i9cw.fsf@posteo.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 672 bytes --]
Tags: patch
Prior to this patch, "is not" is not highlighted in python-ts-mode.
This patch targets the emacs-29 branch.
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.18.0, Xaw3d scroll bars)
Repository revision: 354a2958f9ae547529b8f35cbd8659a0136d0d56
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101009
System Description: NixOS 24.05 (Uakari)
Configured using:
'configure
--prefix=/nix/store/8y2rr52vqnv9wdjjcahqpxasy4raqkxx-emacs-git-20231124.0
--disable-build-details --with-modules --with-x-toolkit=lucid
--with-xft --with-cairo --with-native-compilation --with-tree-sitter'
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-python-Add-is-not-as-an-entry-in-python-treesit-keyw.patch --]
[-- Type: text/patch, Size: 949 bytes --]
From 6757ddd11a6d451ff2eb0c2cc1bb6ddb907eac30 Mon Sep 17 00:00:00 2001
From: Brian Leung <leungbk@posteo.net>
Date: Fri, 24 Nov 2023 23:20:40 -0800
Subject: [PATCH] python: Add "is not" as an entry in python--treesit-keywords
* lisp/progmodes/python.el (python--treesit-keywords): Add the
operator "is not".
---
lisp/progmodes/python.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index a7944576196..0d47135bc5f 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -969,7 +969,7 @@ python--treesit-keywords
"raise" "return" "try" "while" "with" "yield"
;; These are technically operators, but we fontify them as
;; keywords.
- "and" "in" "is" "not" "or" "not in"))
+ "and" "in" "is" "not" "or" "not in" "is not"))
(defvar python--treesit-builtins
'("abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray"
--
2.42.0
next reply other threads:[~2023-11-25 7:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-25 7:24 Brian Leung [this message]
[not found] ` <handler.67440.B.170089708523558.ack@debbugs.gnu.org>
2023-11-25 9:30 ` bug#67440: Acknowledgement ([PATCH] python: Add "is not" as an entry in python--treesit-keywords) Brian Leung
2023-11-25 11:06 ` bug#67440: [PATCH] python: Add "is not" as an entry in python--treesit-keywords 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=87a5r2i9cw.fsf@posteo.net \
--to=leungbk@posteo.net \
--cc=67440@debbugs.gnu.org \
--cc=casouri@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.