简体   繁体   English

Emacs高亮显示变量没有前缀?

[英]Emacs highlight variables not prefixed by?

I'm trying to highlight names like "myname", but not "?myname". 我正在尝试突出显示“ myname”之类的名称,而不是“?myname”。 I've used this regex but the highlight includes the preceding characters: 我使用了此正则表达式,但突出显示的部分包括前面的字符:

("[^\\?[:word:]][[:alpha:]][_[:word:]]*" . font-lock-function-name-face)

For example, in "(myname == 1)" the "(" is colored in addition to "myname". 例如,在“((myname == 1)”中,除“ myname”外,“(”还带有颜色。

Is there a work around for this? 有没有解决的办法?

What's wrong with just "[[:alpha:]][_[:word:]]*" ? "[[:alpha:]][_[:word:]]*"什么问题?

Character ? 性格? has neither alpha nor word syntax. 没有字母或单词语法。 Same for character ( . 字符(相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM