clojure-emacs/clojure-mode

align-arguments indentation malfunctions when expression nested in a macro

ProjectFrank opened this issue · 1 comments

When indenting a macro s-expression with clojure-indent-style set to 'align-arguments, indentation of nested forms reverts to behaviour similar to 'always-align.

Expected behavior

(defn foo []
  (str
    "hello"))

"hello")) is aligned with the list nested within the defn form.

Actual behavior

(defn foo []
  (str
   "hello"))

"hello")) is indented.

Steps to reproduce the problem

  1. Write a non-macro form where the second list item is on the next line.
  2. Nest the non-macro form in a macro form, such as when or defn as in the example above.
  3. Select a region containing a macro form.
  4. Hit <tab> (indent-for-tab-command).

Environment & Version information

clojure-mode version

clojure-mode (version 5.14.0)

Emacs version

27.2

Operating system

macOS Monterey

I'm finding that the tests pass, despite indentation behaviour being different when I test this manually. I'd appreciate it if anyone else is able to confirm or deny this behaviour by testing manually.