From 54d8b5a25eca51f9728ff21f104d014e160ca6d6 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 12 Jul 2018 15:46:51 +0200 Subject: Emacs: load sentence-navigation with care --- emacs/.emacs.d/main.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index 492b417..421f74a 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -2554,14 +2554,14 @@ Pass ARG to `comint-delchar-or-maybe-eof'." (evil-space-mode +1))) (use-package sentence-navigation - :if evil-mode - :config (progn - (define-key evil-motion-state-map ")" 'sentence-nav-evil-forward) - (define-key evil-motion-state-map "(" 'sentence-nav-evil-backward) - (define-key evil-motion-state-map "g)" 'sentence-nav-evil-forward-end) - (define-key evil-motion-state-map "g(" 'sentence-nav-evil-backward-end) - (define-key evil-outer-text-objects-map "s" 'sentence-nav-evil-a-sentence) - (define-key evil-inner-text-objects-map "s" 'sentence-nav-evil-inner-sentence))) + :if (and evil-mode (boundp 'sentence-nav-evil-forward)) + :config (progn + (define-key evil-motion-state-map ")" #'sentence-nav-evil-forward) + (define-key evil-motion-state-map "(" #'sentence-nav-evil-backward) + (define-key evil-motion-state-map "g)" #'sentence-nav-evil-forward-end) + (define-key evil-motion-state-map "g(" #'sentence-nav-evil-backward-end) + (define-key evil-outer-text-objects-map "s" #'sentence-nav-evil-a-sentence) + (define-key evil-inner-text-objects-map "s" #'sentence-nav-evil-inner-sentence))) ;;;; End -- cgit 1.4.1