-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
"Nascif Abousalh-Neto" <[EMAIL PROTECTED]> writes:
> Hi,
> Just wondering, would it be possible to use the JDE semantic
> "knowledge" about a Java file to assign a font lock specifically for
> local variables?
>
> This would be wonderful to catch those situations where you
> create a local variable that "eclipses" a class data member, and end
> up making an update that loses effect as soon as the scope is
> closed... Naming conventions help, but if you're reading someone
> else's code that don't use them, you're out of luck!
<snip>
Should be. Font-lock usually uses regexp but you can give it a function. Once
ran the function needs to update the match-data everytime it finds a match.
Then you can use faces to colorize the local variables. I would suggest using
an italic attribute.
It might be nicer to use overlays and temporarily enable or disable local
variable detection. You would need to set the buffer read only while it is on
though.
Kevin
- --
Kevin A. Burton ( [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] )
Cell: 408-910-6145 URL: http://relativity.yi.org ICQ: 73488596
Patriotism is the last refuge of a scoundrel.
-- Samuel Johnson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt
iD8DBQE6rTx1AwM6xb2dfE0RAswAAJ0fq7HHVR1XFSwK3TANJaeyDLQsxgCfTUOk
ajZHlon8KmcekLfsp/MesFQ=
=PQ+S
-----END PGP SIGNATURE-----