Skip to content

Commit

Permalink
[Fix #607] Don't eval pprint code in the tooling session
Browse files Browse the repository at this point in the history
This way it will respect the *print-length* setting of the main session.

This also fixes #454.
  • Loading branch information
Bozhidar Batsov committed Jun 11, 2014
1 parent 112550d commit 69fce18
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ paths over tramp by default.
* [#610](https://github.com/clojure-emacs/cider/pull/610) Present error and
stacktrace info for all exception causes.

### Bugs fixed

* [#607](https://github.com/clojure-emacs/cider/pull/607): Respect
`*print-length*` in `cider-pprint-eval-defun-at-point` and
`cider-pprint-eval-last-sexp`.

## 0.6.0 / 2014-04-24

### New features
Expand Down
16 changes: 8 additions & 8 deletions cider-interaction.el
Original file line number Diff line number Diff line change
Expand Up @@ -1089,22 +1089,22 @@ Print its value into the current buffer."
(cider-interactive-eval-print (cider-last-sexp)))

(defun cider-pprint-eval-last-sexp ()
"Evaluate the expression preceding point and pprint its value in a popup buffer."
"Evaluate the sexp preceding point and pprint its value in a popup buffer."
(interactive)
(let ((form (cider-last-sexp))
(result-buffer (cider-popup-buffer cider-result-buffer nil)))
(cider-tooling-eval (cider-format-pprint-eval form)
(cider-popup-eval-out-handler result-buffer)
(cider-current-ns))))
(cider-eval (cider-format-pprint-eval form)
(cider-popup-eval-out-handler result-buffer)
(cider-current-ns))))

(defun cider-pprint-eval-defun-at-point ()
"Evaluate the current top-level form at point and pprint its value in a popup buffer."
"Evaluate the top-level form at point and pprint its value in a popup buffer."
(interactive)
(let ((form (cider-defun-at-point))
(result-buffer (cider-popup-buffer cider-result-buffer nil)))
(cider-tooling-eval (cider-format-pprint-eval form)
(cider-popup-eval-out-handler result-buffer)
(cider-current-ns))))
(cider-eval (cider-format-pprint-eval form)
(cider-popup-eval-out-handler result-buffer)
(cider-current-ns))))

(defun cider-insert-in-repl (form eval)
"Insert FORM in the REPL buffer and switch to it.
Expand Down

0 comments on commit 69fce18

Please sign in to comment.