diff options
author | Bozhidar Batsov <bozhidar@batsov.com> | 2014-06-15 19:08:56 +0300 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@batsov.com> | 2014-06-15 19:08:56 +0300 |
commit | 462257ce1ee3d09236a347e3731e120d3c3bf7b5 (patch) | |
tree | 8eb62fe8e58f74319323025e05b705eaf4e230df | |
parent | 45870d30e8b7a838d56e584ce8ad44af7123c18d (diff) |
Remove some fugly REPL ns setup code
It's pretty much redundant now that we have cider-nrepl.
-rw-r--r-- | cider-repl.el | 5 | ||||
-rw-r--r-- | nrepl-client.el | 20 |
2 files changed, 1 insertions, 24 deletions
diff --git a/cider-repl.el b/cider-repl.el index be6e8207..446b2c93 100644 --- a/cider-repl.el +++ b/cider-repl.el @@ -212,11 +212,6 @@ Insert a banner, unless NOPROMPT is non-nil." (with-current-buffer buffer (unless (eq major-mode 'cider-repl-mode) (cider-repl-mode)) - ;; use the same requires by default as clojure.main does - ;; load them a with a delay to avoid a possible race condition - ;; TODO: Do this async - (sleep-for 1) - (cider-eval-sync nrepl-repl-requires-sexp) (when cider-repl-print-length (cider-repl-set-print-length cider-repl-print-length)) (cider-repl-reset-markers) diff --git a/nrepl-client.el b/nrepl-client.el index 0c5d5f4f..def03103 100644 --- a/nrepl-client.el +++ b/nrepl-client.el @@ -92,9 +92,6 @@ should be an `plist` of the form :type 'function :group 'nrepl) -(defvar nrepl-repl-requires-sexp "(clojure.core/apply clojure.core/require '[[clojure.repl :refer (source apropos dir pst doc find-doc)] [clojure.java.javadoc :refer (javadoc)] [clojure.pprint :refer (pp pprint)]])" - "Things to require in the tooling session and the REPL buffer.") - (defvar-local nrepl-connection-buffer nil) (defvar-local nrepl-server-buffer nil) (defvar-local nrepl-repl-buffer nil) @@ -912,28 +909,13 @@ If so ask the user for confirmation." (nrepl-send-request (list "op" "describe") (nrepl-describe-handler buffer)))) -(defun nrepl-setup-default-namespaces (process) - "Setup default namespaces for PROCESS." - (let ((buffer (process-buffer process))) - (with-current-buffer buffer - (nrepl-send-string - nrepl-repl-requires-sexp - (nrepl-make-response-handler - buffer nil - (lambda (_buffer out) (message out)) - (lambda (_buffer err) (message err)) - nil) - nrepl-buffer-ns - nrepl-tooling-session)))) - (defun nrepl-new-tooling-session-handler (process) "Create a new tooling session handler for PROCESS." (lambda (response) (nrepl-dbind-response response (id new-session) (with-current-buffer (process-buffer process) (setq nrepl-tooling-session new-session) - (remhash id nrepl-pending-requests) - (nrepl-setup-default-namespaces process))))) + (remhash id nrepl-pending-requests))))) (defun nrepl-new-session-handler (process) "Create a new session handler for PROCESS." |