all repos — archive/dotfiles @ 54d8b5a25eca51f9728ff21f104d014e160ca6d6

Superseded by nixfiles

Emacs: load sentence-navigation with care
Alan Pearce alan@alanpearce.eu
Thu, 12 Jul 2018 15:46:51 +0200
commit

54d8b5a25eca51f9728ff21f104d014e160ca6d6

parent

1f90c4a4569379b5a490e35140694cbbe849d5ca

1 files changed, 7 insertions(+), 7 deletions(-)

jump to
M emacs/.emacs.d/main.elemacs/.emacs.d/main.el
@@ -2554,14 +2554,14 @@ :config (progn             (evil-space-mode +1)))
 
 (use-package sentence-navigation
-  :if evil-mode
+  :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)))
+            (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