On Jun 5, 2009, at 5:18 PM, Phil Hagelberg wrote:
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.
Thanks, it's working great.I've attached a patch to allow namespace qualification. I wonder if we should treat the "def" prefix in every namespace like we treat "with-" after this patch. (Right now it's only allowing an optional namespace of "clojure".) I'll be happy to provide a patch for that if you like.
I noticed there are several occurrences of "clojure/" in clojure- mode.el. I think these should all be updated to "clojure.core/".
It's such a pleasure to watch the new "with-" indenting work in clojure.contrib.sql.test.
Thanks! --Steve
diff --git a/clojure-mode.el b/clojure-mode.el index c8b7955..77dcf10 100644 --- a/clojure-mode.el +++ b/clojure-mode.el @@ -457,7 +457,7 @@ This function also returns nil meaning don't specify the indentation." ((or (eq method 'defun) (and (null method) (> (length function) 3) - (string-match "\\`\\(?:clojure/\\)?\\(def\\|with-\\)" function))) + (string-match "\\`\\(?:clojure/\\)?def\\|\\(?:\\S +/\\)?with-" function))) (lisp-indent-defform state indent-point)) ((integerp method)
smime.p7s
Description: S/MIME cryptographic signature