From 4adc464f39d09bfd80f465ae630c8863f75b2790 Mon Sep 17 00:00:00 2001 From: Tu Do Date: Sun, 26 Jul 2015 18:53:20 +0700 Subject: [PATCH] [Fix #13] Check if evil exists before checking it is active Otherwise an error occurs and Srefactor menu cannot be created. --- srefactor-ui.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srefactor-ui.el b/srefactor-ui.el index 250dc13..46bff2d 100644 --- a/srefactor-ui.el +++ b/srefactor-ui.el @@ -226,7 +226,8 @@ when the corresponding MENU-ITEM is selected." 100) (/ (* (frame-height) 10) 100)) - (when evil-mode + (when (and (fboundp 'evil-mode) + evil-mode) (evil-emacs-state))) (error (srefactor-ui--clean-up-menu-window) (message "Error when creating menu."))))