Created
May 6, 2012 04:53
-
-
Save leoliu/2614567 to your computer and use it in GitHub Desktop.
fix-cursor-marker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/swank/core/protocol.clj | |
+++ b/src/swank/core/protocol.clj | |
@@ -12,6 +12,10 @@ | |
no pkg exists, then nothing is done." | |
([text] (.replaceAll (re-matcher namespace-re text) "$1/"))) | |
+(defn- fix-cursor-marker | |
+ "Changes the cursor marker." | |
+ ([text] (.replace text "swank::%cursor-marker%" ":cursor-marker"))) | |
+ | |
(defn write-swank-message | |
"Given a `writer' (java.io.Writer) and a `message' (typically an | |
sexp), encode the message according to the swank protocol and | |
@@ -43,7 +47,7 @@ | |
len (Integer/parseInt len-str 16) | |
msg (read-chars reader len read-fail-exception) | |
form (try | |
- (read-string (fix-namespace msg)) | |
+ (read-string (fix-cursor-marker (fix-namespace msg))) | |
(catch Exception ex | |
(.println System/err (format "unreadable message: %s" msg)) | |
(throw ex)))] | |
-- | |
1.7.10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment