all repos — nixfiles @ f7f1eb54efd195b3a98860537c64e367790e47a6

System and user configuration, managed by nix and home-manager

Emacs: silence evil-want-keybinding error when byte-compiling
Alan Pearce alan@alanpearce.eu
Fri, 15 Nov 2019 16:39:54 +0100
commit

f7f1eb54efd195b3a98860537c64e367790e47a6

parent

cbab6521f9aee19c47f4422c8e98eab542421d2f

1 files changed, 6 insertions(+), 5 deletions(-)

jump to
M user/emacs/.emacs.d/init.eluser/emacs/.emacs.d/init.el
@@ -297,14 +297,15 @@ "r" #'winner-redo                     "C-r" #'winner-redo))
 ;;; Evil
 
+(defvar evil-want-integration)
+(defvar evil-want-keybinding)
+(eval-and-compile
+  (setq evil-want-integration t
+        evil-want-keybinding nil))
+
 (use-package evil
   :demand t
   :commands (evil-mode evil-delete-buffer evil-ex-define-cmd)
-  :init (progn
-	  (defvar evil-want-integration)
-	  (defvar evil-want-keybinding)
-	  (setq evil-want-integration t
-		evil-want-keybinding nil))
   :custom ((evil-shift-width 2)
 	   (evil-mode-line-format nil))
   :config (evil-mode +1)