diff options
author | Barry Warsaw <barry@python.org> | 2000-12-27 17:41:47 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2000-12-27 17:41:47 (GMT) |
commit | e0c182fb5f0c54f89b2648de23daf5a2f98fa12b (patch) | |
tree | 41e9fdc9b03c4758b0ae691f386313b7309b68cb /Misc/python-mode.el | |
parent | dd699b62c59d8fdbdf97a219a2a1125b691e5a98 (diff) | |
download | cpython-e0c182fb5f0c54f89b2648de23daf5a2f98fa12b.zip cpython-e0c182fb5f0c54f89b2648de23daf5a2f98fa12b.tar.gz cpython-e0c182fb5f0c54f89b2648de23daf5a2f98fa12b.tar.bz2 |
(python-font-lock-keywords): Add highlighting of `as' as a keyword,
but only in "import foo as bar" statements (including optional
preceding `from' clause).
Diffstat (limited to 'Misc/python-mode.el')
-rw-r--r-- | Misc/python-mode.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el index 332dff7..3952b4d 100644 --- a/Misc/python-mode.el +++ b/Misc/python-mode.el @@ -332,6 +332,8 @@ support for features needed by `python-mode'.") ;; block introducing keywords with immediately following colons. ;; Yes "except" is in both lists. (cons (concat "\\b\\(" kw2 "\\)[ \n\t(]") 1) + ;; `as' but only in "import foo as bar" + '("[ \t]*\\(\\bfrom\\b.*\\)?\\bimport\\b.*\\b\\(as\\)\\b" . 2) ;; classes '("\\bclass[ \t]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)" 1 font-lock-type-face) |