Skip to content

Support prefixed syms in clojure-indent-function #283

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

Merged
merged 1 commit into from
Jun 20, 2015

Conversation

Chouser
Copy link
Contributor

@Chouser Chouser commented Apr 1, 2015

When a Clojure lib uses the same var name as clojure.core, it may have prefer different indent rules. This change allows specific prefixed symbols to override the indent rule of the unprefixed symbol.

For example, you can have a rule like (do 0) as well as (my-ns/do 1) and the latter will be preferred for actual uses of my-ns/do.

When a Clojure lib uses the same var name as clojure.core, it may have prefer different indent rules. This change allows specific prefixed symbols to override the indent rule of the unprefixed symbol.
@bbatsov
Copy link
Member

bbatsov commented Apr 1, 2015

Looks good. Can you also update the changelog and add a couple of basic tests for this? (see #271 for details)

@Chouser
Copy link
Contributor Author

Chouser commented Apr 6, 2015

Sure.

It looks like there's no code in the repo for indentation tests yet? Were you hoping I'd write that too? My elisp-foo isn't very strong, but if that was your intention I could take a swing at it.

@bbatsov
Copy link
Member

bbatsov commented Apr 6, 2015

It looks like there's no code in the repo for indentation tests yet? Were you hoping I'd write that too? My elisp-foo isn't very strong, but if that was your intention I could take a swing at it.

Just copy something from the modes I mentioned. The "framework" code for the indentation tests should be pretty much the same for any mode. Ping me if you get stuck somewhere.

@bbatsov
Copy link
Member

bbatsov commented May 17, 2015

@Chouser I added some basic tests to get you started, so I guess we can wrap finish this PR.

@expez
Copy link
Member

expez commented Jun 11, 2015

@Chouser ping :)

bbatsov added a commit that referenced this pull request Jun 20, 2015
Support prefixed syms in clojure-indent-function
@bbatsov bbatsov merged commit d477772 into clojure-emacs:master Jun 20, 2015
@bbatsov
Copy link
Member

bbatsov commented Jun 20, 2015

I'll merge this and add the tests myself.

@Chouser Chouser deleted the Chouser-clojure-indent-01 branch June 26, 2015 18:19
@Chouser
Copy link
Contributor Author

Chouser commented Jun 26, 2015

@bbatsov Sorry I dropped the ball on this; thanks for picking it up.

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.

3 participants