From: Barry Warsaw Date: Wed, 27 Dec 2000 17:41:47 +0000 (+0000) Subject: (python-font-lock-keywords): Add highlighting of `as' as a keyword, X-Git-Tag: v2.1a1~477 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0c182fb5f0c54f89b2648de23daf5a2f98fa12b;p=thirdparty%2FPython%2Fcpython.git (python-font-lock-keywords): Add highlighting of `as' as a keyword, but only in "import foo as bar" statements (including optional preceding `from' clause). --- diff --git a/Misc/python-mode.el b/Misc/python-mode.el index 332dff7fcfb6..3952b4d67786 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)