[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: perl-mode "::" as word character [patch]
From: |
Stefan Monnier |
Subject: |
Re: perl-mode "::" as word character [patch] |
Date: |
Sun, 01 May 2005 12:44:03 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) |
> Just dropping in for a teeny bit. I was studying font-lock innards the
> other day and noticed that the perl-mode font lock does a lot of
> wrangling around the '::' sequence. That's what's used in perl to
> divide package names from package members. But instead of sticking
> \\(::\\sw\\)*s in after every \\sw, I noticed it'd be much simpler just
> to consider the double colon (NOT the single colon) to be a \\sw
> character. Seems pretty cut and dried, since :: was only introduced to
> perl as a namespace separator, and can be wholly considered as if it
> were a word character.
Word syntax is clearly wrong. Symbol syntax (i.e. "_") OTOH sounds right.
> Also since my experience has been that print/printf are used like
> keywords, but act like functions; they could use some special
> highlighting. As for functions in general, both &\\(\\sw+\\) and
> \\(\\sw+\\)( match a function name in perl, but perl-mode only
> highlights the first expression as a function.
I don't think function calls should be highlighted, only function definitions.
But that's just me.
Could you (re)send a context diff rather than plain diff?
Stefan