mirror of
https://github.com/python/cpython.git
synced 2025-10-22 14:42:22 +00:00
(py-tab-face): => py-mixed-indentation-face
(python-font-lock-keywords): Better regexp given by Sjoerd. This matches only mixed indentation which is probably more useful than matching all tabs.
This commit is contained in:
parent
e908b6ba57
commit
8ca702823d
1 changed files with 6 additions and 5 deletions
|
@ -309,10 +309,11 @@ source code of the innermost frame.")
|
||||||
:type 'function
|
:type 'function
|
||||||
:group 'python)
|
:group 'python)
|
||||||
|
|
||||||
(defface py-tab-face nil
|
(defface py-mixed-indentation-face nil
|
||||||
"Face that tabs are displayed in.
|
"Face that mixed indentation is displayed in.
|
||||||
To quickly see mixed tabs/spaces, use \\[customize-face] and set the
|
To quickly see mixed tabs/spaces, use \\[customize-face] and set the
|
||||||
background of `py-tab-face' to something obnoxious (like \"Yellow\")."
|
background of `py-mixed-indentation-face' to something obnoxious (like
|
||||||
|
\"Yellow\")."
|
||||||
:group 'python)
|
:group 'python)
|
||||||
|
|
||||||
;; Not customizable
|
;; Not customizable
|
||||||
|
@ -377,8 +378,8 @@ support for features needed by `python-mode'.")
|
||||||
;; functions
|
;; functions
|
||||||
'("\\bdef[ \t]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)"
|
'("\\bdef[ \t]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)"
|
||||||
1 font-lock-function-name-face)
|
1 font-lock-function-name-face)
|
||||||
;; tabs
|
;; mixed tabs and spaces indentation
|
||||||
'("^[\t]+" 0 py-tab-face)
|
'("^[ \t]*\\( \t\\|\t \\)[ \t]*" 0 py-mixed-indentation-face)
|
||||||
))
|
))
|
||||||
"Additional expressions to highlight in Python mode.")
|
"Additional expressions to highlight in Python mode.")
|
||||||
(put 'python-mode 'font-lock-defaults '(python-font-lock-keywords))
|
(put 'python-mode 'font-lock-defaults '(python-font-lock-keywords))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue