Skip to content

Commit e2550c3

Browse files
committed
Don't treat the symbol default as def* macro.
See b31e941#commitcomment-14257272
1 parent 651b2b2 commit e2550c3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

clojure-mode.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,9 @@ This function also returns nil meaning don't specify the indentation."
828828
(or (and clojure-defun-style-default-indent
829829
;; largely to preserve useful alignment of :require, etc in ns
830830
(not (string-match "^:" function)))
831-
(string-match "\\`\\(?:\\S +/\\)?\\(def\\|with-\\)"
832-
function)))))
831+
(and (string-match "\\`\\(?:\\S +/\\)?\\(def\\|with-\\)"
832+
function)
833+
(not (string-match "\\`default" function)))))))
833834
(+ lisp-body-indent containing-form-column))
834835
(_ (clojure--normal-indent calculate-lisp-indent-last-sexp))))))
835836

test/clojure-mode-indentation-test.el

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ values of customisable variables."
240240
(:gen-class)
241241
)")
242242

243+
(def-full-indent-test default-is-not-a-define
244+
"(default a
245+
b
246+
b)")
247+
243248
(def-full-indent-test non-symbol-at-start
244249
"{\"1\" 2
245250
*3 4}")

0 commit comments

Comments
 (0)