Skip to content

Commit

Permalink
rename generic (&optional prefix) args
Browse files Browse the repository at this point in the history
  • Loading branch information
gonewest818 committed Dec 7, 2017
1 parent 0b697f7 commit 1decb7e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cider-interaction.el
Original file line number Diff line number Diff line change
Expand Up @@ -1174,12 +1174,12 @@ arguments and only proceed with evaluation if it returns nil."
(interactive "r")
(cider-interactive-eval nil nil (list start end)))

(defun cider-eval-last-sexp (&optional prefix)
(defun cider-eval-last-sexp (&optional output-to-current-buffer)
"Evaluate the expression preceding point.
If invoked with a PREFIX argument, print the result in the current buffer."
If invoked with OUTPUT-TO-CURRENT-BUFFER, print the result in the current buffer."
(interactive "P")
(cider-interactive-eval nil
(when prefix (cider-eval-print-handler))
(when output-to-current-buffer (cider-eval-print-handler))
(cider-last-sexp 'bounds)))

(defun cider-eval-last-sexp-and-replace ()
Expand All @@ -1192,14 +1192,14 @@ If invoked with a PREFIX argument, print the result in the current buffer."
(backward-kill-sexp)
(cider-interactive-eval last-sexp (cider-eval-print-handler))))

(defun cider-eval-sexp-at-point (&optional pprint-to-current-buffer)
(defun cider-eval-sexp-at-point (&optional output-to-current-buffer)
"Evaluate the expression around point.
If invoked with PPRINT-TO-CURRENT-BUFFER, output the result to current buffer."
If invoked with OUTPUT-TO-CURRENT-BUFFER, output the result to current buffer."
(interactive "P")
(save-excursion
(goto-char (cadr (cider-sexp-at-point 'bounds)))
(cider-eval-last-sexp pprint-to-current-buffer)))
(cider-eval-last-sexp output-to-current-buffer)))

(defun cider-eval-defun-to-comment (&optional insert-before)
"Evaluate the \"top-level\" form and insert result as comment.
Expand Down Expand Up @@ -1288,11 +1288,11 @@ Print its value into the current buffer."
(when (consp form) form)
(cider--nrepl-pprint-request-plist (cider--pretty-print-width)))))

(defun cider-pprint-eval-last-sexp (&optional prefix)
(defun cider-pprint-eval-last-sexp (&optional output-to-current-buffer)
"Evaluate the sexp preceding point and pprint its value in a popup buffer.
If invoked with a PREFIX argument, insert as comment in the current buffer."
If invoked with OUTPUT-TO-CURRENT-BUFFER, insert as comment in the current buffer."
(interactive "P")
(if prefix
(if output-to-current-buffer
(cider-pprint-eval-last-sexp-to-comment nil)
(cider--pprint-eval-form (cider-last-sexp 'bounds))))

Expand Down

0 comments on commit 1decb7e

Please sign in to comment.