[PATCH 1/2] Move `evil-mode' definition to evil.el.

Trevor Murphy trevor.m.murphy at gmail.com
Sat Nov 1 19:40:43 CET 2014


Do this so that when Emacs generates an autoload for `evil-mode', it
references the correct file to later load all of evil.

We do that so that we don't have to manually override Emacs' generation
of the ;;;###autoload cookie.

We do THAT so that we can let Emacs generate the appropriate autoloads
to enable the globalized minor mode via `custom-set-variables'.
---
 evil-core.el | 4 ----
 evil.el      | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/evil-core.el b/evil-core.el
index 4ccb78a..cb440b7 100644
--- a/evil-core.el
+++ b/evil-core.el
@@ -170,10 +170,6 @@ To enable Evil globally, do (evil-mode 1)."
     (evil-local-mode 1)
     (evil-initialize-state)))
 
-;;;###autoload (autoload 'evil-mode "evil" "Toggle evil in all buffers" t)
-(define-globalized-minor-mode evil-mode
-  evil-local-mode evil-initialize)
-
 ;; No hooks are run in Fundamental buffers, so other measures are
 ;; necessary to initialize Evil in these buffers. When Evil is
 ;; enabled globally, the default value of `major-mode' is set to
diff --git a/evil.el b/evil.el
index d6caf2c..06f393c 100644
--- a/evil.el
+++ b/evil.el
@@ -121,6 +121,10 @@
 
 (run-hooks 'evil-after-load-hook)
 
+;;;###autoload
+(define-globalized-minor-mode evil-mode
+  evil-local-mode evil-initialize)
+
 (provide 'evil)
 
 ;;; evil.el ends here
-- 
2.1.2




More information about the implementations-list mailing list