Refactor feature/evil

- Defer evil-escape a little longer
- Move advice to autoloads file

Gotta go fast.
This commit is contained in:
Henrik Lissner 2019-03-04 20:42:04 -05:00
parent f18e1c0ea1
commit dd0d264a27
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 24 additions and 19 deletions

View file

@ -185,3 +185,23 @@ more information on modifiers."
"Call `doom/escape' if `evil-force-normal-state' is called interactively."
(when (called-interactively-p 'any)
(call-interactively #'doom/escape)))
;;;###autoload
(defun +evil*make-numbered-markers-global (orig-fn char)
(or (and (>= char ?2) (<= char ?9))
(funcall orig-fn char)))
;;;###autoload
(defun +evil*set-jump (orig-fn &rest args)
"Set a jump point and ensure ORIG-FN doesn't set any new jump points."
(evil-set-jump (if (markerp (car args)) (car args)))
(let ((evil--jumps-jumping t))
(apply orig-fn args)))
;;;###autoload
(defun +evil*fix-dabbrev-in-minibuffer ()
"Make `try-expand-dabbrev' from `hippie-expand' work in minibuffer. See
`he-dabbrev-beg', so we need to redefine syntax for '/'."
(set-syntax-table (let* ((table (make-syntax-table)))
(modify-syntax-entry ?/ "." table)
table)))