-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making _ a symbol constituent. #69
base: master
Are you sure you want to change the base?
Conversation
- Comments indicate that this shouldn't work in XEmacs, but if we only make it a symbol constituent in GNU Emacs, this should still work with XEmacs.
Can you give me a quick rundown on what |
Hello! "" as symbol constituent means that "a_b_c" is a symbol, but the words consist of "a", "b" and "c". When "" is a word character, the word is "a_b_c" as well. This allows the user to navigate between parts of the symbol with backward/forward-word. However, my change seems to introduce errors in syntax highlighting (probably related to the comment in the syntax table definition), which I'll have to debug. Some of the font-lock rules seem to use |
Added the "\\s_" element to all parts where [:word:] appeared. This way, we can have _ as a symbol constituent for proper backward/forward-word movement.
Fixed the font-locking rules to add symbol characters to all regexes. This fixes font-locking for identifiers containing underscores. However, I'm not clear on the interoperability with XEmacs, as I don't use it. The only thing that could potentially be a problem is support of the |
Now that you mention it, this change might also break other emacs packages that copied our regexps for matching identifiers. I'll have to think about this. |
This shouldn't influence other packages at all. The [:word:] class Of course, I can't guarantee anything^^. I'd like to mention though |
The go-eldoc package, for example, copied and slightly modified our regexps, which means they still use |
If go-eldoc uses the go-mode syntax table, this would break their copy I'll try and have a look at go-eldoc tomorrow and see if I can fix it |
make it a symbol constituent in GNU Emacs, this should still work with XEmacs.