Is there any reason not to highlight "lambda:" as a keyword, i.e. when
it's immediately followed by a colon? The patch below takes a stab at
that. I guess it might be ideal if the colon were not highlighted; I
didn't look into that.
Thanks very much for the python-mode code and please tell me if there's
a more convenient way that I should submit a patch.
Dan
Highlight lambda as keyword when followed immediately by colon
* python-mode.el (python-font-lock-keywords): Add "lambda:"
Modified python-mode.el
diff --git a/python-mode.el b/python-mode.el
index 447c691..79d12d4 100644
--- a/python-mode.el
+++ b/python-mode.el
@@ -588,7 +588,7 @@ support for features needed by `python-mode'.")
)
"\\|"))
(kw2 (mapconcat 'identity
- '("else:" "except:" "finally:" "try:")
+ '("else:" "except:" "finally:" "try:" "lambda:")
"\\|"))
(kw3 (mapconcat 'identity
;; Don't include Ellipsis in this list, since it is
_______________________________________________
Python-mode mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-mode