lang/common-lisp: improve evil+sly integration

This commit is contained in:
Henrik Lissner 2018-06-22 01:03:26 +02:00
parent 3a3eb92087
commit 13cb219e49
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 118 additions and 2 deletions

View file

@ -0,0 +1,11 @@
;;; lang/common-lisp/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +common-lisp*sly-last-sexp (command &rest args)
"In normal-state or motion-state, last sexp ends at point."
(if (and (not evil-move-beyond-eol)
(or (evil-normal-state-p) (evil-motion-state-p)))
(save-excursion
(unless (or (eobp) (eolp)) (forward-char))
(apply command args))
(apply command args)))