clojure-emacs / clojure-emacs/clojure-mode

Defining indentation specs for multi-arity functions

Open
#501 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
1k
Forks
249
PR merge metrics
No merged PRs in 30d

Description

I have a function (function, not macro. But I don't think it matters) with the following signatures:

```
[request payoff right-body]
[request response-data payoff right-body]
[request response-data includes payoff & right-body]
```

The correct indentation for these would be to indent right-body as a 'body' parameter.

Given that the position of right-body in the arglist varies, one cannot use a fixed number for `(put-clojure-indent ...)`.

Is this a known problem?

Intuitively, I'd want to express indentation as `(put-clojure-indent 'my-fn :last)`, :last being the thing to implement.

(By the way I don't like the original function to begin with, but I shouldn't refactor other people's code just because I can't indent it)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.