clojure-emacs / clojure-emacs/clojure-mode
Defining indentation specs for multi-arity functions
- Lenguaje dominante
- Emacs Lisp
- Estrellas
- 1k
- Forks
- 249
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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)
Guía de contribución
Línea de trabajo
Comienza en el punto de entrada `(put-clojure-indent ...)` y revisa cómo se interpretan las especificaciones de indentación. Explora cómo una especificación `:last` podría manejar la posición variable de `right-body` y, después, valida el comportamiento con los tres ejemplos de múltiples aridades del issue.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- emacs, emacs-lisp
- Área
- tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100