clojure-emacs / clojure-emacs/clojure-mode

Reader conditional confuses indentation

Aperta
#620 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug help wanted indentation
Lingua principale
Emacs Lisp
Stelle
1k
Fork
249
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Expected behavior

```clj
(reify
Object

#?@(:clj
[(equals
[this other])

(hashCode
[_]
(hash 1))]

:cljs
[(toJSON
[this]
(throw (ex-info "error" {})))

IEquiv

(-equiv
[this other]
true)]))
```

## Actual behavior

```clj

(reify
Object

#?@(:clj
[(equals
[this other]) ; <------

(hashCode
[_]
(hash 1))]

:cljs
[(toJSON
[this] ; <------
(throw (ex-info "error" {})))

IEquiv

(-equiv
[this other]
true)]))

```

## Steps to reproduce the problem

`(setq clojure-indent-style 'align-arguments)`
(But the problem is the same with `'always-align`.)

Paste in a buffer and indent.

(C-x h TAB)

## Environment & Version information

### clojure-mode version

`M-x
clojure-mode-display-version`

clojure-mode (version nil)

When checking in packages:
20220418.2015

### Emacs version

28.1

### Operating system

Ubuntu 18.04.6 LTS

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.