1.2.0 permalink Arrow_down_16x16

read-swank-message

swank.core.protocol

  • (read-swank-message reader)
Given a `reader' (java.io.Reader), read the message as a clojure
form (typically a sexp). This method will block until a message is
completely transfered.

Note: This function will do some amount of Common Lisp -> clojure
conversions. This is due to the fact that several slime functions
like to treat everything it's talking to as a common lisp
implementation.
- If an :emacs-rex form is received and the first form contains a
common lisp package designation, this will convert it to use a
clojure designation.
- t will be converted to true

See also `write-swank-message'.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source swank/core/protocol.clj:25 top

(defn read-swank-message
  "Given a `reader' (java.io.Reader), read the message as a clojure
   form (typically a sexp). This method will block until a message is
   completely transfered.

   Note: This function will do some amount of Common Lisp -> clojure
   conversions. This is due to the fact that several slime functions
   like to treat everything it's talking to as a common lisp
   implementation.
     - If an :emacs-rex form is received and the first form contains a
       common lisp package designation, this will convert it to use a
       clojure designation.
     - t will be converted to true

   See also `write-swank-message'."
  ([#^java.io.Reader reader]
     (let [len  (Integer/parseInt (read-chars reader 6 read-fail-exception) 16)
           msg  (read-chars reader len read-fail-exception)
           form (read-string (fix-namespace msg))]
       (if (seq? form)
         (deep-replace {'t true} form)
         form))))
Vars in swank.core.protocol/read-swank-message: defn let seq?
Used in 0 other vars

Comments top

No comments for read-swank-message. Log in to add a comment.