aboutsummaryrefslogtreecommitdiff
path: root/clojure/src
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2015-01-06 20:55:35 -0600
committerJoel Martin <github@martintribe.org>2015-01-09 16:16:56 -0600
commit47930f746366d5730170e817ad233e8c3e020270 (patch)
treec947ffcf6e2fa838bbc9b0a33efb026c7def8ab0 /clojure/src
parentf4c8a091aaf662b9b544a852a728459e84e5b7f5 (diff)
downloadmal-47930f746366d5730170e817ad233e8c3e020270.tar.gz
mal-47930f746366d5730170e817ad233e8c3e020270.zip
Clojure: only load readline history once.
Diffstat (limited to 'clojure/src')
-rw-r--r--clojure/src/readline.clj3
1 files changed, 2 insertions, 1 deletions
diff --git a/clojure/src/readline.clj b/clojure/src/readline.clj
index 0fc449a..a510e13 100644
--- a/clojure/src/readline.clj
+++ b/clojure/src/readline.clj
@@ -27,7 +27,8 @@
(def load-history (jna/to-fn Integer readline/read_history)))
(defn readline [prompt & [lib]]
- (if (not @history-loaded)
+ (when (not @history-loaded)
+ (reset! history-loaded true)
(load-history HISTORY-FILE))
(let [line (readline-call prompt)]
(when line