summaryrefslogtreecommitdiff
path: root/cider-interaction.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2016-02-07 01:22:18 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2016-02-07 20:18:17 +0000
commit906208799177cf21137eb28f4a6f05cb234fa973 (patch)
tree449a21fe7e3fe5d8b412fe97c82feeefa6d0fff1 /cider-interaction.el
parent4ff8ed931df37b9dd48514c8a0ea9025fb3411df (diff)
Consolidate some defun-at-point functions
Diffstat (limited to 'cider-interaction.el')
-rw-r--r--cider-interaction.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/cider-interaction.el b/cider-interaction.el
index 685d38c8..be6c6c16 100644
--- a/cider-interaction.el
+++ b/cider-interaction.el
@@ -1064,10 +1064,8 @@ If invoked with a PREFIX argument, print the result in the current buffer."
With a prefix arg, LOC, insert before the form, otherwise afterwards."
(interactive "P")
(let ((defun-at-point (cider-defun-at-point))
- (insertion-point
- (if loc
- (cider-defun-at-point-start-pos)
- (cider-defun-at-point-end-pos))))
+ (insertion-point (nth (if loc 0 1)
+ (cider-defun-at-point 'bounds))))
(cider-interactive-eval defun-at-point
(cider-eval-print-with-comment-handler
(current-buffer) insertion-point
@@ -1119,7 +1117,7 @@ command `cider-debug-defun-at-point'."
(concat (if debug-it "#dbg\n")
(cider-defun-at-point))
nil
- (cider--region-for-defun-at-point)))
+ (cider-defun-at-point 'bounds)))
(defun cider-pprint-eval-defun-at-point ()
"Evaluate the \"top-level\" form at point and pprint its value in a popup buffer."