-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Paragraph filling, more indentation fixes, and tests for the emacs mode #9015
Conversation
Sorry about that...I found a mistake in the tests and a regression in the indent code after I submitted this, and have added the fix for them (the two commits after the tests are added.) I added them without amending the existing commits since I had already submitted the PR, but I can squash them back down if needed. |
Hmm...no idea why the tests failed, since I didn't touch any of the actual code here. Will bors retry it if I ask it to, or does it need a repo collab to do it? Only one way to find out... |
@bors: retry |
@MicahChalmer: yeah, and a repo collaborator has to do it (and it's done on the commit itself) |
Oh, I see...on the commit, rather than on the pull request. And mine wouldn't have done it anyway. Thanks! |
…tsakis Here are fixes for more problems mentioned in #8787. I think I've addressed everything mentioned there except for @nikomatsakis's comment about match/patterns now. (This also fixes the bug in struct alignment that @pnkfelix mentioned from my earlier pull request #8872.) The biggest change here is to make fill-paragraph (M-q) and auto-fill-mode work inside different variations of multi-line and doc comments. Because of the way emacs paragraph fills work (callbacks interacting with global regexp variables that are used in odd ways) there were quite a few edge cases that I had to work around. The only way I was able to keep it all straight was to create some regression tests. They use the emacs lisp regression testing tool ERT, and are included as the last commit here. I added a few tests for indentation as well. I have not attempted to integrate the tests into the overall rust compiler build process, since I can't imagine anyone would want the compiler build to have a dependency on emacs. Maybe at some point tools like this get their own repositories? Just a thought. One other thought related to the tests: should there be a place to put these types of style samples that isn't specific to one text editor? Maybe as part of an official rust style guide, but in a form that would allow tools like this to pull out the samples and use them for tests?
ignore item in `thread_local!` macro close rust-lang#8493 This PR ignores `thread_local` macro in `declare_interior_mutable_const`. changelog: ignore `thread_local!` macro in `declare_interior_mutable_const`
Here are fixes for more problems mentioned in #8787. I think I've addressed everything mentioned there except for @nikomatsakis's comment about match/patterns now. (This also fixes the bug in struct alignment that @pnkfelix mentioned from my earlier pull request #8872.)
The biggest change here is to make fill-paragraph (M-q) and auto-fill-mode work inside different variations of multi-line and doc comments. Because of the way emacs paragraph fills work (callbacks interacting with global regexp variables that are used in odd ways) there were quite a few edge cases that I had to work around.
The only way I was able to keep it all straight was to create some regression tests. They use the emacs lisp regression testing tool ERT, and are included as the last commit here. I added a few tests for indentation as well. I have not attempted to integrate the tests into the overall rust compiler build process, since I can't imagine anyone would want the compiler build to have a dependency on emacs. Maybe at some point tools like this get their own repositories? Just a thought.
One other thought related to the tests: should there be a place to put these types of style samples that isn't specific to one text editor? Maybe as part of an official rust style guide, but in a form that would allow tools like this to pull out the samples and use them for tests?