Hi Phil,
I'd sent this to jochu earlier, but perhaps you can help commit this
minor patch to clojure-mode.
I found a small bug in the regexp used in `swank-clojure-find-
package'. The head version incorrectly parses `ns' forms of the
following kind:
(ns compojure.server.jetty
"Clojure interface to start an embedded Jetty server."
(:use compojure.control)
(:use compojure.server.common)
(:import org.mortbay.jetty.Server)
(:import org.mortbay.jetty.servlet.Context)
(:import org.mortbay.jetty.servlet.ServletHolder)
(:import org.mortbay.jetty.security.SslSocketConnector))
and returns the package name as:
compojure.server.jetty
"Clojure interface to start an embedded Jetty server."
The following patch modifies the regexp in `swank-clojure-find-
package' to fix this:
diff --git a/swank-clojure.el b/swank-clojure.el
index 96dc91e..9e4174b 100644
--- a/swank-clojure.el
+++ b/swank-clojure.el
@@ -80,7 +80,7 @@ swank-clojure-java-path) if non-nil."
file (format "%s" encoding))))
(defun swank-clojure-find-package ()
- (let ((regexp "^(\\(clojure.core/\\)?\\(in-\\)?ns\\s-+[:']?\\([^()]+
\\>\\)"))
+ (let ((regexp "^(\\(clojure.core/\\)?\\(in-\\)?ns\\s-+[:']?\\([^()
\" \t\n]+\\>\\)"))
(save-excursion
(when (or (re-search-backward regexp nil t)
(re-search-forward regexp nil t))
Thanks.
-ram
--
http://cynojure.posterous.com
On Jul 1, 3:47 pm, Phil Hagelberg <[email protected]> wrote:
> Chris Dean <[email protected]> writes:
> > Where's the current home for the Emacs clojure-mode source? I have a one
> > line patch I'd like to make, but don't know where to send it!
>
> > Is ithttp://github.com/technomancy/clojure-mode/tree/master ?
>
> That's my repository. Technically the canonical one is
> athttp://github.com/jochu/clojure-mode/but I have commit access there, so
> I can take care of it. Patches here on the mailing list are welcome.
>
> > Anyway I'll include the patch to add a local-abbrev-table here since it
> > is so small.
>
> It looks like your patch might be incomplete; I get a void-variable:
> clojure-mode-abbrev-table when I run that.
>
> -Phil
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---