Permalink
Browse files

Clean up some style and docstring problems

  • Loading branch information...
1 parent 708a23b commit 908b7b367694a469a820bee4cc09766882f936c7 @trptcolin committed Apr 7, 2013
Showing with 5 additions and 9 deletions.
  1. +3 −3 src/clj/reply/parsing.clj
  2. +2 −6 src/clj/reply/reader/simple_jline.clj
@@ -52,15 +52,15 @@
and :prompt-string.
- ns: the current ns, available because it can be useful for read-line-fn
- prompt-string: for customizing the prompt
- - text-so-far: mostly useful in the recursion"
+ - text-so-far: mostly useful in the recursion
+ And returns a seq of *strings* representing complete forms."
[{:keys [ns request-exit text-so-far
prompt-string read-line-fn] :as options}]
(if-let [next-text (read-line-fn {:ns ns :prompt-string prompt-string})]
(let [interrupted? (= :interrupted next-text)
parse-tree (when-not interrupted? (reparse text-so-far next-text))]
(if (or interrupted? (empty? (:content parse-tree)))
(list "")
- (process-parse-tree parse-tree options)
- ))
+ (process-parse-tree parse-tree options)))
(list request-exit)))
@@ -95,13 +95,9 @@
:no-jline no-jline
:prompt-string prompt-string
:completer-factory completer-factory)
-
- (when input-stream ; default args are janky
+ (when input-stream
(swap! jline-state assoc :input-stream input-stream))
-
- (swap! jline-state
- (fn [previous-state]
- (get-input-line previous-state)))
+ (swap! jline-state get-input-line)
(if (:interrupted @jline-state) ;; TODO: don't do this same check in 2 places
:interrupted
(:input @jline-state)))

0 comments on commit 908b7b3

Please sign in to comment.