diff options
author | Barry Warsaw <barry@python.org> | 1997-11-05 18:55:50 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1997-11-05 18:55:50 (GMT) |
commit | ef3c891773c129273fa9f39d96993d37c8b56c86 (patch) | |
tree | 9d5ac2b56af53ae9ba4a7d4cd5c6a78acdddec0c /Misc | |
parent | 5e21cb0bfb116658bc1c566fc284408c90dcbdad (diff) | |
download | cpython-ef3c891773c129273fa9f39d96993d37c8b56c86.zip cpython-ef3c891773c129273fa9f39d96993d37c8b56c86.tar.gz cpython-ef3c891773c129273fa9f39d96993d37c8b56c86.tar.bz2 |
(python-font-lock-keywords): Fix for consecutive keyword font locking,
given by Sjoerd Mullender <Sjoerd.Mullender@cwi.nl>.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/python-mode.el | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el index dc6e738..ebcb139 100644 --- a/Misc/python-mode.el +++ b/Misc/python-mode.el @@ -257,12 +257,8 @@ features supporting those needed by CC Mode.") )) (kwregex (mapconcat 'identity keywords "\\|"))) (list - ;; keywords not at beginning of line - (cons (concat "\\s-\\(" kwregex "\\)[ \n\t(]") 1) - ;; keywords at beginning of line. i don't think regexps are - ;; powerful enough to handle these two cases in one regexp. - ;; prove me wrong! - (cons (concat "^\\(" kwregex "\\)[ \n\t(]") 1) + ;; keywords + (cons (concat "\\b\\(" kwregex "\\)\\b[ \n\t(]") 1) ;; classes '("\\bclass[ \t]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)" 1 font-lock-type-face) |