Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit bf79f80c440d9d710271827d42328a4ac33840a4 1 parent 39e9e2e
@pjstadig pjstadig authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  clojure-mode.el
View
2  clojure-mode.el
@@ -646,7 +646,7 @@ This function also returns nil meaning don't specify the indentation."
((or (eq method 'defun)
(and (null method)
(> (length function) 3)
- (string-match "\\`\\(?:\\S +/\\)?def\\|with-"
+ (string-match "\\`\\(?:\\S +/\\)?\\(def\\|with-\\)"
function)))
(lisp-indent-defform state indent-point))
Please sign in to comment.
Something went wrong with that request. Please try again.