[Python-checkins] CVS: python/dist/src/Misc python-mode.el,3.108,3.109
Barry Warsaw
python-dev@python.org
Wed, 27 Dec 2000 09:41:49 -0800
Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv16451
Modified Files:
python-mode.el
Log Message:
(python-font-lock-keywords): Add highlighting of `as' as a keyword,
but only in "import foo as bar" statements (including optional
preceding `from' clause).
Index: python-mode.el
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/python-mode.el,v
retrieving revision 3.108
retrieving revision 3.109
diff -C2 -r3.108 -r3.109
*** python-mode.el 2000/10/27 05:00:25 3.108
--- python-mode.el 2000/12/27 17:41:47 3.109
***************
*** 333,336 ****
--- 333,338 ----
;; 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_]*\\)"