开发者

Emacs php-mode font-lock properties are not applied to certain chars

For example variable dollar signs.

php-mode.el line 1087:

'("\\$\\(\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-variable-name-face)) ; $variable

If I'm not mistaken the regexp should match $variable including the dollar sign. Now, i'm trying to figure out why isn't the font-lock property applied to the dollar sign also. I开发者_如何学JAVAn the syntax table $ is considered a word just like A-z.

So i guess what i'm trying to ask is: Did anyone experienced the same problem and has he/she found a solution?


The 1 in there means match the first capture group denoted by (escaped) parens. The $ is outside that capture group. So it could either be moved inside, or change the 1 to a 0 which means use the entire regexp.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜