Skip to content

clojure-align misaligns code that is improperly indented #551

Closed
@kylc

Description

@kylc

Expected behavior

Using clojure-align on a block like this, which is not properly indented to
begin with:

(let [a-long-name 10
b 20])

Should result in properly indented and aligned code, like this:

(let [a-long-name 10
      b           20])

Actual behavior

A single clojure-align application results in this:

(let [a-long-name 10
      b                 20])

A second application arrives at the proper result.

This is due to the clojure-align implementation, which first aligns the region as-is, then performs an indentation step.

Steps to reproduce the problem

Use clojure-align on improperly indented blocks of code, as above.

Environment & Version information

clojure-mode version information

clojure-mode-20191112.1948

Emacs version

Emacs 26.3

Operating system

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions