summaryrefslogtreecommitdiff
path: root/cider-interaction.el
diff options
context:
space:
mode:
authorVitalie Spinu <spinuvit@gmail.com>2014-08-06 08:53:42 -0700
committerVitalie Spinu <spinuvit@gmail.com>2014-08-07 14:12:49 -0700
commit19a5e7f14be29ebc93b0fb79bf3e1cedd32c83b9 (patch)
tree797e9ed909e7f090207c3e227ae92ca81d3c63d2 /cider-interaction.el
parent77a8501f8bc9cf6855501f2ba21d28d4d6aee4c9 (diff)
Refactor and document nrepl-client.el
Refactor: - general code and documentation cleanup - use -- convention for internal function of very limited use - inline several very short internal functions - use systematic naming convention for requests. Namely nrepl-send-request and nrepl-send-sync-request for workhorse functions and `nrepl-request:XXX` and `nrepl-sync-request:OP` for requests of type "OP". - rename `nrepl-send-request-sync` into `nrepl-send-sync-request` - delete `nrepl-log-messages` command Reorganize nrepl-client.el in functional chapters: - Bencode - Client: Process Filter - Client: Initialization - Client: Response Handling - Client: Request Handling - Server - Utilities - Connection Buffer Management - Connection Browser Document the nREPL communication process.
Diffstat (limited to 'cider-interaction.el')
-rw-r--r--cider-interaction.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/cider-interaction.el b/cider-interaction.el
index 7b44832d..93116755 100644
--- a/cider-interaction.el
+++ b/cider-interaction.el
@@ -631,7 +631,7 @@ When called interactively, this operates on point."
(interactive (list (thing-at-point 'filename)))
(cider-ensure-op-supported "resource")
(-if-let* ((resource (-> (list "op" "resource" "name" path)
- (nrepl-send-request-sync)
+ (nrepl-send-sync-request)
(plist-get :value)))
(buffer (cider-find-file resource)))
(cider-jump-to buffer line)
@@ -702,7 +702,7 @@ form, with symbol at point replaced by __prefix__."
"Return a list of completions for STR using nREPL's \"complete\" op."
(cider-ensure-op-supported "complete")
(let ((strlst (plist-get
- (nrepl-send-request-sync
+ (nrepl-send-sync-request
(list "op" "complete"
"session" (nrepl-current-session)
"ns" nrepl-buffer-ns
@@ -1052,7 +1052,7 @@ If location could not be found, return nil."
(defun cider-need-input (buffer)
"Handle an need-input request from BUFFER."
(with-current-buffer buffer
- (nrepl-send-stdin (concat (read-from-minibuffer "Stdin: ") "\n")
+ (nrepl-request:stdin (concat (read-from-minibuffer "Stdin: ") "\n")
(cider-stdin-handler buffer))))
@@ -1597,7 +1597,7 @@ strings, include private vars, and be case sensitive."
,@(when docs-p '("docs?" "t"))
,@(when privates-p '("privates?" "t"))
,@(when case-sensitive-p '("case-sensitive?" "t")))
- (nrepl-send-request-sync)
+ (nrepl-send-sync-request)
(plist-get :value))))
(cider-show-apropos summary results query docs-p)
(message "No apropos matches for %S" query)))