Skip to content

indentation of conditional forms misbehaves before text is entered #327

@j0ni

Description

@j0ni

This seems like a low priority issue.

I'm using clojure-mode from melpa, so whatever is current HEAD of master.

When I start typing a conditional expression and hit the first newline, emacs indents the next line wrongly, like this:

(if (pred?)
    ))

Reformatting confirms that emacs is doing this intentionally. As soon as I add text, I can reformat and emacs will do the right thing:

(if (pred?)
  ()))

This also seems to happen for when and if-let, but then I stopped looking.

I'd rather it did the right thing when I hit return, but it's obviously a minor annoyance and doesn't block anything.

Edit: there seem to be quite a few indentation regressions. Here's another:

(defn- test-nil-backend [f]
  (is (thrown-with-msg? ExceptionInfo
                      #"Storage must be initialized before use"
                      (f))))

I'll stop now - let me know if more are useful. I'll also explore the possibility that my config has slipped into brokenness by not tracking some important change.

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