Hoàng Minh Thắng <p...@banphim.net> writes: > I have a macro, let's say `look-like-case`. When trying to indent with > Emacs, the result is: > ``` > (look-like-case a > b > c) > ``` > which is not what I want. How can I make Emacs to indent it like this:
(define-clojure-indent (look-like-case 1) ...) Have a look at line 742 and the following lines of clojure-mode.el. That defines the indentation rules for the standard clojure macros and special forms. > Btw, how to share that hack along with the library? You could create an clj-<library>.el. --8<---------------cut here---------------start------------->8--- (require 'clojure-mode) (define-clojure-indent (look-like-case 1) ...) ;; more stuff (provide 'clojure-<library>) --8<---------------cut here---------------end--------------->8--- In case you also define new functions and variables/defcustoms, you should prefix them with clj-<library> in order not to clash with symbols from other packages. Bye, Tassilo -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.