diff options
| author | Stefan Kangas | 2021-10-11 15:10:26 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2021-10-11 21:24:38 +0200 |
| commit | 392d6708a5b0a1b291f50986cb31552c9d4786df (patch) | |
| tree | d1c4fe9cc33c838a017216c870170fd9e86f98d0 /lisp/progmodes/python.el | |
| parent | 47e09d1855488a9fa4608ef6c6da64dff58fc871 (diff) | |
| download | emacs-392d6708a5b0a1b291f50986cb31552c9d4786df.tar.gz emacs-392d6708a5b0a1b291f50986cb31552c9d4786df.zip | |
Fontify "print" and "exec" as functions in python-mode
This change was first made on master, but on closer consideration it
is better to fix this bug already in Emacs 28.1.
* lisp/progmodes/python.el (python-font-lock-keywords-level-2):
Fontify "print" and "exec" as functions, which is the case in
Python 3. (Bug#43298) Do not merge to master.
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index c58ac6f637d..de6cfcb1ce1 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -555,9 +555,6 @@ class declarations.") | |||
| 555 | "assert" "else" "if" "pass" "yield" "break" "except" "import" "class" | 555 | "assert" "else" "if" "pass" "yield" "break" "except" "import" "class" |
| 556 | "in" "raise" "continue" "finally" "is" "return" "def" "for" "lambda" | 556 | "in" "raise" "continue" "finally" "is" "return" "def" "for" "lambda" |
| 557 | "try" | 557 | "try" |
| 558 | ;; Python 2: | ||
| 559 | "print" "exec" | ||
| 560 | ;; Python 3: | ||
| 561 | ;; False, None, and True are listed as keywords on the Python 3 | 558 | ;; False, None, and True are listed as keywords on the Python 3 |
| 562 | ;; documentation, but since they also qualify as constants they are | 559 | ;; documentation, but since they also qualify as constants they are |
| 563 | ;; fontified like that in order to keep font-lock consistent between | 560 | ;; fontified like that in order to keep font-lock consistent between |