summaryrefslogtreecommitdiff
path: root/cider-client.el
diff options
context:
space:
mode:
authorVitalie Spinu <spinuvit@gmail.com>2014-09-19 12:16:26 -0700
committerVitalie Spinu <spinuvit@gmail.com>2014-09-19 22:12:18 -0700
commit77a44c702c600fa64a33e5c14836207ad37106c7 (patch)
tree3b6d681a9d760840adee049daab4339f5c49dcf5 /cider-client.el
parent7512b836b6d4048ea7d5bc68f178d4370078cf25 (diff)
Refactor the interactive evaluation API
- There is now one API entry point - `cider-interactive-eval`. All other commands are based on it. - Simplify the code by removing unused or unnecessary API functions: `cider-interactive-eval-print`, `cider-popup-eval-print-handler`, `cider-popup-eval-print`, `cider-interactive-eval-to-repl` - Rename `cider-interactive-eval-print-handler` -> `cider-eval-print-handler`. - Bring all interactive eval functionality into one place and arrange functions in a logical order. - `buffer` argument to interactive eval handlers is optional
Diffstat (limited to 'cider-client.el')
-rw-r--r--cider-client.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/cider-client.el b/cider-client.el
index 3c4bef50..b036beb7 100644
--- a/cider-client.el
+++ b/cider-client.el
@@ -154,16 +154,17 @@ unless ALL is truthy."
;;; Requests
-(defun cider-request:load-file (file-contents file-path file-name)
+(defun cider-request:load-file (file-contents file-path file-name &optional callback)
"Perform the nREPL \"load-file\" op.
FILE-CONTENTS, FILE-PATH and FILE-NAME are details of the file to be
-loaded."
+loaded. If CALLBACK is nil, use `cider-load-file-handler'."
(nrepl-send-request (list "op" "load-file"
"session" (nrepl-current-session)
"file" file-contents
"file-path" file-path
"file-name" file-name)
- (cider-load-file-handler (current-buffer))))
+ (or callback
+ (cider-load-file-handler (current-buffer)))))
;;; Sync Requests