-
Notifications
You must be signed in to change notification settings - Fork 33
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
Remove the Emacs Lisp specific escaping test. #4
Conversation
In fact, nuke the infrastructure altogether. Parens as characters without a backslash are nasty and they really should never be used: - This syntax is discouraged by the GNU Emacs Lisp Reference Manual. - They confuse many a minor mode, such as show-paren-mode. - The way we currently handle them partially solves the problem, but is a hack made of eldritch magic, implemented by gluing special cases together hoping they'll work... - ...but it doesn't really work, and it's pretty easy to get mishighlighted delimiters anyway. - They confuse the Emacs Lisp indentation engine. Really. - It's the major mode's job to set the syntax-table properties on individual characters. Because of these reasons, it's just easier to drop this misfeature and rely on people to start using ?\( instead. And because the whole point of rainbow-delimiters-escaped-char-predicate-list is to allow for this, nuke it too. It was never *really* a documented part of the API.
Really not a problem for me. I'd rather the code be clean, maintainable and performant than slavishly try to handle every possible crazy edge case. |
Yet a week ago you said:
But I guess you changed your mind.
Anyway, it's not important now that this hack got nuked. I wonder how many hacks are left. |
That's not a contradiction. You can read it as: it would be a shame if that case didn't work, but ultimately I place greater value on clean code than on keeping that case working. :-) |
@Fanael could this be fixed in Emacs itself? If so, what would need to change? |
I'm not the best person to ask this question, because I don't really know a lot about Emacs, but I imagine that
is probably the easiest way to deal with this. It should be possible, and likely necessary, to implement this as a third-party minor mode, as an interim solution until it's fixed in Emacs itself, thanks to the amount of bureaucracy driving Emacs development. |
You'd be surprised how quickly fixes can be put in place in the Emacs core thanks to the involvement of people like @dgutov in recent years. But yes, that still helps only users of Emacs HEAD until the next version gets released. |
Only if the fix is written by somebody who's already signed the CLA selling one's soul to Stallman. I haven't, so if I wanted to fix something, legalese alone would take a couple of months. |
Regarding patches, the first 15 lines are "free". But you can submit a bug report instead though, right? |
Yes, and that's what I do: so far, I reported all Emacs bugs affecting me. All zero of them. |
Hey @Wilfred, would you perhaps go ahead and |
In fact, nuke the infrastructure altogether.
Parens as characters without a backslash are nasty and they really should never be used:
show-paren-mode
.syntax-table
properties on individual characters.Because of these reasons, it's just easier to drop this misfeature and rely on people to start using
?\(
instead.And because the whole point of
rainbow-delimiters-escaped-char-predicate-list
is to allow for this, nuke it too. It was never really a documented part of the API.@purcell (and others who want this test still there): I'm sorry. I understand that you want it. But the current hack doesn't really work. Try deleting the backslash in this code:
The
)
closing the list will be mismatched, and everything below and including thedefun
will have wrong depth.If you want to have a truly working handling of unbackslashed parens as characters, you should probably try and contribute to the
EVIL-ignore-blacklisted-delims-altogether
branch. The approach used there has at least some chance of getting this right, for some values of "right".Or, convince me that the broken mess used by rainbow-delimiters right now is better than a similarly broken non-mess. To be frank, I suggest you invest your time into making #1 mergable instead of trying to convince me, as it's much easier.