Cider: Don't advise if evil-move-beyond-eol is true
This commit is contained in:
parent
08cb490f19
commit
5cb5ef1e03
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue