"Stephen C. Gilardi" <squee...@mac.com> writes: > While I often like lining up all the arguments generally, it is the > one thing that I "fix" manually from time to time when the loss of > horizontal real estate becomes too great to tolerate. > > One possible improvement would be to change clojure-mode so that > "with- *" (as a regex) would use with-like rules. A uniform rule for > "do-*" would also probably work.
That's a good idea. It turns out to be pretty easy to implement for with-* forms. I've committed this to my copy of clojure-mode: http://github.com/technomancy/clojure-mode My implementation only works when the with- form is referred in the current namespace, but you could fix that with a little more regex tweakage. I'm pretty sure with-* forms that don't behave as macros-taking-bodies are very edge-casey, but if anyone disagrees please speak up. I did not add do-* because most core "do" functions don't have a dash in them, but I didn't want it to affect functions that simply happen to start with the letters D and O. It's not as slam-dunk of a heuristic as "with-" is. > What are the downsides to always indenting list contents that start on > a new line as indented 2 (possibly optionally 1) from their opening > paren? The main downside is that the current approach makes it very easy to distinguish at a glance between def-style macros and regular function calls. I would be very reluctant to give this up. -Phil --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---