aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-04-21 23:15:29 +0800
committerGuangxiong Lin <[email protected]>2022-04-21 23:15:29 +0800
commit49aa78b8d2e01b275038eb3869660fde3a077423 (patch)
tree547062092e1407164e9521a2a29cc0152f85b92c
parent660d23aabf0173df42a3404dd68d14a7caeedc8d (diff)
downloaddotfiles-49aa78b8d2e01b275038eb3869660fde3a077423.tar.gz
dotfiles-49aa78b8d2e01b275038eb3869660fde3a077423.tar.bz2
dotfiles-49aa78b8d2e01b275038eb3869660fde3a077423.zip
Add more autoload in emacs
-rw-r--r--.emacs.d/lisp/init-completion.el1
-rw-r--r--.emacs.d/lisp/init-evil.el2
-rw-r--r--.emacs.d/lisp/init-minibuffer.el3
-rw-r--r--.emacs.d/lisp/init-package.el1
-rw-r--r--.emacs.d/lisp/init-utils.el2
5 files changed, 9 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-completion.el b/.emacs.d/lisp/init-completion.el
index dbbb758..1199f4b 100644
--- a/.emacs.d/lisp/init-completion.el
+++ b/.emacs.d/lisp/init-completion.el
@@ -26,6 +26,7 @@
'((file (styles . (partial-completion))))))
(when (gx/maybe-require-package 'cape)
+ (autoload #'cape-file "cape")
(add-to-list 'completion-at-point-functions #'cape-file))
(provide 'init-completion)
diff --git a/.emacs.d/lisp/init-evil.el b/.emacs.d/lisp/init-evil.el
index e8977c6..3ea1728 100644
--- a/.emacs.d/lisp/init-evil.el
+++ b/.emacs.d/lisp/init-evil.el
@@ -1,4 +1,5 @@
(when (gx/maybe-require-package 'evil)
+ (autoload #'evil-mode "evil")
(add-hook 'after-init-hook (lambda () (evil-mode 1)) 'append))
(setq evil-want-integration t
@@ -45,6 +46,7 @@
;; evil-easymotion
(when (gx/maybe-require-package 'evil-easymotion)
(with-eval-after-load 'evil
+ (require 'evil-easymotion)
(evilem-default-keybindings "SPC")))
(provide 'init-evil)
diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el
index 32d5744..56c1164 100644
--- a/.emacs.d/lisp/init-minibuffer.el
+++ b/.emacs.d/lisp/init-minibuffer.el
@@ -1,6 +1,7 @@
;; -*- lexical-binding: t -*-
(when (gx/maybe-require-package 'vertico)
+ (autoload #'vertico-mode "vertico")
(add-hook 'after-init-hook #'vertico-mode 'append))
(setq vertico-resize t
@@ -47,6 +48,8 @@
"fd --type f --hidden --follow --exclude .git"))
(when (gx/maybe-require-package 'affe)
+ (autoload 'affe-find "affe")
+ (autoload 'affe-grep "affe")
(with-eval-after-load 'evil
(evil-define-key 'normal 'global
(kbd "<leader>ff") 'affe-find
diff --git a/.emacs.d/lisp/init-package.el b/.emacs.d/lisp/init-package.el
index 7ae2022..11ee08f 100644
--- a/.emacs.d/lisp/init-package.el
+++ b/.emacs.d/lisp/init-package.el
@@ -43,6 +43,7 @@ https://github.com/purcell/emacs.d/blob/master/lisp/init-elpa.el"
(package-initialize)
(gx/maybe-require-package 'auto-package-update)
+(autoload #'auto-package-update-now "auto-package-update")
(setq auto-package-update-delete-old-versions t
auto-package-update-hide-results t)
diff --git a/.emacs.d/lisp/init-utils.el b/.emacs.d/lisp/init-utils.el
index dd3713d..d244084 100644
--- a/.emacs.d/lisp/init-utils.el
+++ b/.emacs.d/lisp/init-utils.el
@@ -1,10 +1,12 @@
(defun gx/diminish (mode &optional to-what)
(when (gx/maybe-require-package 'diminish)
+ (require 'diminish)
(diminish mode to-what)))
(setq exec-path-from-shell-arguments '("-l"))
(when (gx/maybe-require-package 'exec-path-from-shell)
(when (memq window-system '(mac ns))
+ (require 'exec-path-from-shell)
(exec-path-from-shell-initialize)))
(provide 'init-utils)