Fork me on GitHub
#emacs
<
2016-01-29
>
ddellacosta13:01:28

trying to set up indent formatting for some functions/macros using define-clojure-indent, and sometimes it just seems to not work

ddellacosta13:01:50

how can I debug this? I’m relatively clueless when it comes to emacs lisp, I have to admit 😞

Michael Griffiths13:01:15

@ddellacosta: what exactly are you trying to do? This is how I use define-clojure-indent in my config:

(define-clojure-indent
  (for-all 1)
  (quick-check 1))

ddellacosta13:01:39

@cichli: yeah, exactly, that’s what I’ve got

ddellacosta13:01:49

but, for some functions it just doesn’t seem to get picked up

ddellacosta13:01:05

in particular, I’m trying to set it up for some route macros used by compojure-api

Michael Griffiths13:01:08

But works for others?

ddellacosta13:01:22

(define-clojure-indent
  (GET* 1)
  (POST* 1))

ddellacosta13:01:54

like, I’ve got the go macro from core.async in there, works just fine

ddellacosta13:01:08

just tested in the same namespace to confirm

Michael Griffiths13:01:35

If I eval that then it indents as follows:

(GET* :foo
  :bar)

(POST* :foo
  :bar)
which I think is right? Maybe check you’re on the latest version of clojure-mode

ddellacosta13:01:05

@cichli ah, good point—let me confirm that, thanks

minimal14:01:10

wouldn’t you want (GET* 2)?

minimal14:01:57

(GET* "/hello" []
  :query-params [name :- String]
  (ok {:message (str "Hello, " name)}))

ddellacosta14:01:32

minimal: huh, that seems to have done it…!? Well, I won’t think too hard about it. Thanks!

minimal14:01:13

the number is just the number of forms you want on the top line after the GET*