diff options
| author | James Nguyen <james@jojojames.com> | 2017-11-28 21:39:31 -0800 |
|---|---|---|
| committer | James Nguyen <james@jojojames.com> | 2017-11-28 21:39:31 -0800 |
| commit | 5cb5ef1e03c2450ccbd34498757d01e5391741c3 (patch) | |
| tree | e17328b7f86145a4a7362d4f1c2c04c8a2500c24 | |
| parent | 08cb490f19920e02523aa4182d7b2c40cfe74883 (diff) | |
Cider: Don't advise if evil-move-beyond-eol is true
| -rw-r--r-- | evil-cider.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/evil-cider.el b/evil-cider.el index fa79ccb..4423136 100644 --- a/evil-cider.el +++ b/evil-cider.el @@ -41,11 +41,12 @@ (defun evil-cider-setup () "Set up `evil' bindings for `cider'." - (advice-add 'cider-eval-last-sexp :around 'evil-cider-last-sexp) - (advice-add 'cider-eval-last-sexp-and-replace :around 'evil-cider-last-sexp) - (advice-add 'cider-eval-last-sexp-to-repl :around 'evil-cider-last-sexp) - (with-eval-after-load 'cider-eval-sexp-fu - (advice-add 'cider-esf--bounds-of-last-sexp :around 'evil-cider-last-sexp)) + (unless evil-move-beyond-eol + (advice-add 'cider-eval-last-sexp :around 'evil-cider-last-sexp) + (advice-add 'cider-eval-last-sexp-and-replace :around 'evil-cider-last-sexp) + (advice-add 'cider-eval-last-sexp-to-repl :around 'evil-cider-last-sexp) + (with-eval-after-load 'cider-eval-sexp-fu + (advice-add 'cider-esf--bounds-of-last-sexp :around 'evil-cider-last-sexp))) (evil-define-key '(normal visual) cider-mode-map "gd" 'cider-find-var |
