Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion clojure-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,7 @@ Returns a list pair, e.g. (\"defn\" \"abc\") or (\"deftest\" \"some-test\")."
Sexps that don't represent code are ^metadata or #reader.macros."
(comment-normalize-vars)
(comment-forward (point-max))
(looking-at-p "\\^\\|#[?[:alpha:]]"))
(looking-at-p "\\^\\|#[?[:alpha:]]\\|,"))

(defun clojure-forward-logical-sexp (&optional n)
"Move forward N logical sexps.
Expand All @@ -1465,6 +1465,7 @@ This will skip over sexps that don't represent objects, so that ^hints and
(while (> n 0)
(while (clojure--looking-at-non-logical-sexp)
(forward-sexp 1))
(skip-chars-forward ",")
;; The actual sexp
(forward-sexp 1)
(setq n (1- n))))))
Expand Down
6 changes: 6 additions & 0 deletions test/clojure-mode-indentation-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,12 @@ x
:b {:a :a
:aa :a}}")

(def-full-align-test trailing-commas
"{:a {:a :a,
:aa :a},
:b {:a :a,
:aa :a}}")


;;; Misc

Expand Down