diff options
| author | Eivind Fonn <evfonn@gmail.com> | 2019-12-20 13:48:58 +0100 |
|---|---|---|
| committer | Eivind Fonn <evfonn@gmail.com> | 2019-12-21 10:09:42 +0100 |
| commit | 183bae9e64da2f0389aaa07dfbfd6cfe4620372c (patch) | |
| tree | 911beb1ecc4e1f508ca45d5b0f5721074d815618 /evil-integration.el | |
| parent | c95049a2ca471fc7bdc0cb14f11b482f3e20e834 (diff) | |
Expand abbrevs after insert state only if abbrev-mode is enabled
Diffstat (limited to 'evil-integration.el')
| -rw-r--r-- | evil-integration.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/evil-integration.el b/evil-integration.el index 33abb5f..284f9d4 100644 --- a/evil-integration.el +++ b/evil-integration.el @@ -516,9 +516,12 @@ Based on `evil-enclose-ace-jump-for-motion'." "V" 'evil-visual-screen-line)) ;;; abbrev.el -(when evil-want-abbrev-expand-on-insert-exit - (eval-after-load 'abbrev - '(add-hook 'evil-insert-state-exit-hook 'expand-abbrev))) +(defun evil-maybe-expand-abbrev () + (when (and abbrev-mode evil-want-abbrev-expand-on-insert-exit) + (expand-abbrev))) + +(eval-after-load 'abbrev + '(add-hook 'evil-insert-state-exit-hook 'evil-maybe-expand-abbrev)) ;;; ElDoc (eval-after-load 'eldoc |
