Skip to content

Commit 15e6ea8

Browse files
committed
(Again) Don't treat the symbol default as def* macro.
This time check properly, without assuming "default" is at the start of the whole regexp match.
1 parent 183ae4d commit 15e6ea8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clojure-mode.el

+2-2
Original file line numberDiff line numberDiff line change
@@ -818,9 +818,9 @@ This function also returns nil meaning don't specify the indentation."
818818
(or (and clojure-defun-style-default-indent
819819
;; largely to preserve useful alignment of :require, etc in ns
820820
(not (string-match "^:" function)))
821-
(and (string-match "\\`\\(?:\\S +/\\)?\\(def\\|with-\\)"
821+
(and (string-match "\\`\\(?:\\S +/\\)?\\(def[a-z]*\\|with-\\)"
822822
function)
823-
(not (string-match "\\`default" function)))))))
823+
(not (string-match "\\`default" (match-string 1 function))))))))
824824
(+ lisp-body-indent containing-form-column))
825825
(_ (clojure--normal-indent calculate-lisp-indent-last-sexp))))))
826826

0 commit comments

Comments
 (0)