Ignore autoload/evil*.el if evil isn't loaded

This commit is contained in:
Henrik Lissner 2017-05-27 18:31:19 +02:00
parent 29091c40ad
commit 8af009f9b7

View file

@ -433,9 +433,9 @@ the commandline."
(push auto-file autoload-files)) (push auto-file autoload-files))
(when (file-directory-p auto-dir) (when (file-directory-p auto-dir)
(mapc (lambda (file) (mapc (lambda (file)
;; Make evil.el autoload files a special case; don't load them ;; Make evil*.el autoload files a special case; don't load
;; unless evil is enabled. ;; them unless evil is enabled.
(unless (and (equal (file-name-nondirectory file) "evil.el") (unless (and (string-prefix-p "evil" (file-name-nondirectory file))
(not (featurep! :feature evil))) (not (featurep! :feature evil)))
(push file autoload-files))) (push file autoload-files)))
(file-expand-wildcards (expand-file-name "*.el" auto-dir) t))))) (file-expand-wildcards (expand-file-name "*.el" auto-dir) t)))))