Skip to content

Commit

Permalink
Evaluation progress bar, fixes clojure-emacs#1197
Browse files Browse the repository at this point in the history
  • Loading branch information
Anatoly Smolyaninov committed Aug 10, 2015
1 parent b1a7b1f commit e6b826d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cider-interaction.el
Original file line number Diff line number Diff line change
Expand Up @@ -1715,14 +1715,19 @@ If `cider-interactive-eval-override' is a function, call it with the same
arguments and only proceed with evaluation if it returns nil."
(let ((form (or form (apply #'buffer-substring bounds)))
(start (car-safe bounds))
(end (car-safe (cdr-safe bounds))))
(end (car-safe (cdr-safe bounds)))
(eval-buffer (current-buffer)))
(unless (and cider-interactive-eval-override
(functionp cider-interactive-eval-override)
(funcall cider-interactive-eval-override form callback bounds))
(cider--prep-interactive-eval form)
(spinner-start 'progress-bar)
(nrepl-request:eval
form
(or callback (cider-interactive-eval-handler nil end))
(lambda (&rest args)
(with-current-buffer eval-buffer (spinner-stop))
(let ((cb (or callback (cider-interactive-eval-handler nil end))))
(when cb (apply cb args))))
;; always eval ns forms in the user namespace
;; otherwise trying to eval ns form for the first time will produce an error
(if (cider-ns-form-p form) "user" (cider-current-ns))
Expand Down

0 comments on commit e6b826d

Please sign in to comment.