Skip to content

Commit

Permalink
[Fix #344] Indentation for extend-type
Browse files Browse the repository at this point in the history
  • Loading branch information
Malabarba committed Nov 8, 2015
1 parent e2550c3 commit 9518de7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clojure-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -896,8 +896,8 @@ it from Lisp code, use (put-clojure-indent 'some-symbol :defn)."
(defrecord '(2 nil nil (1)))
(defprotocol '(1))
(extend 1)
(extend-protocol '(1 (1)))
(extend-type '(1 (1)))
(extend-protocol '(1 :defn))
(extend-type '(1 :defn))
(specify '(1 (1)))
(specify! '(1 (1)))
(implement '(1 (1)))
Expand Down
16 changes: 16 additions & 0 deletions test/clojure-mode-indentation-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,22 @@ values of customisable variables."
b
b)")

(def-full-indent-test extend-type-allow-multiarity
"(extend-type Banana
Fruit
(subtotal
([item]
(* 158 (:qty item)))
([item a]
(* a (:qty item)))))"
"(extend-protocol Banana
Fruit
(subtotal
([item]
(* 158 (:qty item)))
([item a]
(* a (:qty item)))))")

(def-full-indent-test non-symbol-at-start
"{\"1\" 2
*3 4}")
Expand Down

0 comments on commit 9518de7

Please sign in to comment.