File tree Expand file tree Collapse file tree 2 files changed +17
-10
lines changed
Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -825,16 +825,18 @@ When called from lisp code align everything between BEG and END."
825825 (save-excursion
826826 (goto-char beg)
827827 (while (clojure--find-sexp-to-align end)
828- (align-region (point )
829- (save-excursion
830- (backward-up-list )
831- (forward-sexp 1 )
832- (point ))
833- nil
834- '((clojure-align (regexp . clojure--search-whitespace-after-next-sexp)
835- (group . 1 )
836- (repeat . t )))
837- nil ))))
828+ (let ((sexp-end (save-excursion
829+ (backward-up-list )
830+ (forward-sexp 1 )
831+ (point-marker )))
832+ (clojure-align-forms-automatically nil ))
833+ (align-region (point ) sexp-end nil
834+ '((clojure-align (regexp . clojure--search-whitespace-after-next-sexp)
835+ (group . 1 )
836+ (repeat . t )))
837+ nil )
838+ ; ; Reindent after aligning because of #360.
839+ (indent-region (point ) sexp-end)))))
838840
839841; ;; Indentation
840842(defun clojure-indent-region (beg end )
Original file line number Diff line number Diff line change 489489 how well
490490 multiple words will work)" )
491491
492+ (def-full-align-test nested-maps
493+ " {:a {:a :a
494+ :bbbb :b}
495+ :bbbb :b}" )
496+
492497
493498; ;; Misc
494499
You can’t perform that action at this time.
0 commit comments