Skip to content

Commit 256b800

Browse files
committed
Merge branch 'align-comma'
2 parents 289bb1c + 786c74d commit 256b800

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

clojure-mode.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@ Returns a list pair, e.g. (\"defn\" \"abc\") or (\"deftest\" \"some-test\")."
14581458
Sexps that don't represent code are ^metadata or #reader.macros."
14591459
(comment-normalize-vars)
14601460
(comment-forward (point-max))
1461-
(looking-at-p "\\^\\|#[?[:alpha:]]"))
1461+
(looking-at-p "\\^\\|#[?[:alpha:]]\\|,"))
14621462

14631463
(defun clojure-forward-logical-sexp (&optional n)
14641464
"Move forward N logical sexps.
@@ -1472,6 +1472,7 @@ This will skip over sexps that don't represent objects, so that ^hints and
14721472
(while (> n 0)
14731473
(while (clojure--looking-at-non-logical-sexp)
14741474
(forward-sexp 1))
1475+
(skip-chars-forward ",")
14751476
;; The actual sexp
14761477
(forward-sexp 1)
14771478
(setq n (1- n))))))

test/clojure-mode-indentation-test.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,12 @@ x
540540
:b {:a :a
541541
:aa :a}}")
542542

543+
(def-full-align-test trailing-commas
544+
"{:a {:a :a,
545+
:aa :a},
546+
:b {:a :a,
547+
:aa :a}}")
548+
543549

544550
;;; Misc
545551

0 commit comments

Comments
 (0)