Skip to content

Commit bf79f80

Browse files
committed
Fixes indentation of functions with 'with-' in their name.
clojure-indent-function was incorrectly indenting as a def form an invocation of a function with 'with-' anywhere in its name. For example, it was doing: (with-filling (sandwich :peanutbutter :jelly)) (sandwich-with-filling :peanutbutter :jelly) Instead of: (with-filling (sandwich :peanutbutter :jelly)) (sandwich-with-filling :peanutbutter :jelly) Now it does the latter.
1 parent 39e9e2e commit bf79f80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clojure-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ This function also returns nil meaning don't specify the indentation."
646646
((or (eq method 'defun)
647647
(and (null method)
648648
(> (length function) 3)
649-
(string-match "\\`\\(?:\\S +/\\)?def\\|with-"
649+
(string-match "\\`\\(?:\\S +/\\)?\\(def\\|with-\\)"
650650
function)))
651651
(lisp-indent-defform state indent-point))
652652

0 commit comments

Comments
 (0)