Skip to content
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

julia-mode: Indent manually inside multi-line strings #15183

Merged
merged 1 commit into from
Feb 23, 2016

Conversation

justbur
Copy link
Contributor

@justbur justbur commented Feb 22, 2016

Don't try to automatically indent when inside strings with newline
characters. We don't want to add indentation where it is not intended,
so any automatic formatting should not assume that we want to indent
inside a string. This also fixes #12419, because we won't get confused
by keywords in multi-line strings.

Because it is still useful, make TAB and increase and decrease
indentation when called inside a string.

@yuyichao
Copy link
Contributor

I get an error Symbol's value as variable is void: julia-mode-map if julia-mode-map is used (added by this patch) before julia-mode is defined.

@justbur
Copy link
Contributor Author

justbur commented Feb 22, 2016

That's odd, because it's already used here

@justbur
Copy link
Contributor Author

justbur commented Feb 22, 2016

Oh never mind, I see that it's just the order. Ok I'll fix it now

Don't try to automatically indent when inside strings with newline
characters. We don't want to add indentation where it is not intended,
so any automatic formatting should not assume that we want to indent
inside a string. This also fixes JuliaLang#12419, because we won't get confused
by keywords in multi-line strings.

Because it is still useful, make TAB and <backtab> increase and decrease
indentation when called inside a string.
@justbur
Copy link
Contributor Author

justbur commented Feb 22, 2016

fixed

@yuyichao
Copy link
Contributor

Local test passes and the change (with comment) makes sense.

This is great! Finally don't need to avoid using certain keywords in doc string or put a few end at the end of it. ;-)

p.s. Looks like there's some issue with llvm on travis lin64? llvm is complaining about not finding the right versioned symbol in libstdc++...

yuyichao added a commit that referenced this pull request Feb 23, 2016
julia-mode: Indent manually inside multi-line strings
@yuyichao yuyichao merged commit 7d0c557 into JuliaLang:master Feb 23, 2016
@tkelman
Copy link
Contributor

tkelman commented Feb 23, 2016

Looks like there's some issue with llvm on travis lin64? llvm is complaining about not finding the right versioned symbol in libstdc++...

apt-get failure to get recent gcc

Err http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/ precise/main gcc-5-base amd64 5.2.1-23ubuntu1~12.04
  Unable to connect to ppa.launchpad.net:http:
Err http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/ precise/main libgcc1 amd64 1:5.2.1-23ubuntu1~12.04
  Unable to connect to ppa.launchpad.net:http:
Err http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/ precise/main libstdc++6 amd64 5.2.1-23ubuntu1~12.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

julia-mode: Keyword being recognized and affect indentation inside strings.
3 participants