summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cider-client.el15
-rw-r--r--cider-macroexpansion.el15
2 files changed, 15 insertions, 15 deletions
diff --git a/cider-client.el b/cider-client.el
index 2df238df..e3414740 100644
--- a/cider-client.el
+++ b/cider-client.el
@@ -225,21 +225,6 @@ loaded. If CALLBACK is nil, use `cider-load-file-handler'."
nil
eldoc)))
-(defun cider-sync-request:macroexpand (expander expr &optional display-namespaces)
- "Macroexpand, using EXPANDER, the given EXPR.
-The default for DISPLAY-NAMESPACES is taken from
-`cider-macroexpansion-display-namespaces'."
- (cider-ensure-op-supported "macroexpand")
- (-> (list "op" "macroexpand"
- "expander" expander
- "code" expr
- "ns" (cider-current-ns)
- "display-namespaces"
- (or display-namespaces
- (symbol-name cider-macroexpansion-display-namespaces)))
- (nrepl-send-sync-request)
- (nrepl-dict-get "expansion")))
-
(defun cider-sync-request:ns-list ()
"Get a list of the available namespaces."
(cider--sync-request-value (list "op" "ns-list"
diff --git a/cider-macroexpansion.el b/cider-macroexpansion.el
index 62a0dc8f..c45fe30c 100644
--- a/cider-macroexpansion.el
+++ b/cider-macroexpansion.el
@@ -57,6 +57,21 @@ Possible values are:
'cider-macroexpansion-display-namespaces
"0.8.0")
+(defun cider-sync-request:macroexpand (expander expr &optional display-namespaces)
+ "Macroexpand, using EXPANDER, the given EXPR.
+The default for DISPLAY-NAMESPACES is taken from
+`cider-macroexpansion-display-namespaces'."
+ (cider-ensure-op-supported "macroexpand")
+ (-> (list "op" "macroexpand"
+ "expander" expander
+ "code" expr
+ "ns" (cider-current-ns)
+ "display-namespaces"
+ (or display-namespaces
+ (symbol-name cider-macroexpansion-display-namespaces)))
+ (nrepl-send-sync-request)
+ (nrepl-dict-get "expansion")))
+
(defun cider-macroexpand-undo (&optional arg)
"Undo the last macroexpansion, using `undo-only'.
ARG is passed along to `undo-only'."