Skip to content

Reader conditional confuses indentation #620

@Frozenlock

Description

@Frozenlock

Expected behavior

(reify
  Object    

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

       (hashCode
         [_]
         (hash 1))]

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

       IEquiv

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

Actual behavior

(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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions