-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Right, this has bothered me as well a few times. +1 for the patch.

Georg

Am 03.02.2011 20:10, schrieb Dan Davison:
> 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
> Python-mode@python.org
> http://mail.python.org/mailman/listinfo/python-mode
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk1LIYAACgkQN9GcIYhpnLACzQCgjrIpYB+xelkN4806GDDczjtd
9Y4AnRRzwLSIXP8T3o3QuKVxFJ1MEFjH
=SXfI
-----END PGP SIGNATURE-----
_______________________________________________
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode

Reply via email to