summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-03-20 14:48:30 (GMT)
committerBarry Warsaw <barry@python.org>1998-03-20 14:48:30 (GMT)
commit8ca702823d293288183f5fe4faa2c2916747dace (patch)
treed1bfe027c7e62f9e8d9108cb26b57b5c8a721f78 /Misc
parente908b6ba57d12fc72f49eed21a3ce4c4b3ec9533 (diff)
downloadcpython-8ca702823d293288183f5fe4faa2c2916747dace.zip
cpython-8ca702823d293288183f5fe4faa2c2916747dace.tar.gz
cpython-8ca702823d293288183f5fe4faa2c2916747dace.tar.bz2
(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.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-mode.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index 45eadfe..9b64196 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -309,10 +309,11 @@ source code of the innermost frame.")
:type 'function
:group 'python)
-(defface py-tab-face nil
- "Face that tabs are displayed in.
+(defface py-mixed-indentation-face nil
+ "Face that mixed indentation is displayed in.
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)
;; Not customizable
@@ -377,8 +378,8 @@ support for features needed by `python-mode'.")
;; functions
'("\\bdef[ \t]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)"
1 font-lock-function-name-face)
- ;; tabs
- '("^[\t]+" 0 py-tab-face)
+ ;; mixed tabs and spaces indentation
+ '("^[ \t]*\\( \t\\|\t \\)[ \t]*" 0 py-mixed-indentation-face)
))
"Additional expressions to highlight in Python mode.")
(put 'python-mode 'font-lock-defaults '(python-font-lock-keywords))