summary refs log tree commit diff stats
path: root/tag-emacs/emacs.d/init.el
diff options
context:
space:
mode:
authorAlan Pearce2014-06-21 22:37:18 +0100
committerAlan Pearce2014-06-21 22:38:10 +0100
commitdc03c852e4195b20a25d333690f40f04b6190519 (patch)
treee83de68de6a9181f5480d948f3624e05de2c846a /tag-emacs/emacs.d/init.el
parenta6a88661b160dea1f2b59396f2dbdd2a5a843230 (diff)
downloaddotfiles-dc03c852e4195b20a25d333690f40f04b6190519.tar.lz
dotfiles-dc03c852e4195b20a25d333690f40f04b6190519.tar.zst
dotfiles-dc03c852e4195b20a25d333690f40f04b6190519.zip
Emacs: defer package loading for faster init
Diffstat (limited to 'tag-emacs/emacs.d/init.el')
-rw-r--r--tag-emacs/emacs.d/init.el26
1 files changed, 19 insertions, 7 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index dc50878..fbbef02 100644
--- a/tag-emacs/emacs.d/init.el
+++ b/tag-emacs/emacs.d/init.el
@@ -45,10 +45,9 @@
 (req-package pallet)
 
 (req-package paradox
-  :init (progn
-          (when paradox-github-token
-            (paradox-enable))
-          (setq paradox-automatically-star t)))
+  :defer t
+  :config (progn
+            (setq paradox-automatically-star t)))
 
 ;;;; Style
 
@@ -167,6 +166,7 @@
 ;;;; Communication
 
 (req-package erc
+  :defer t
   :config (progn
             (setq erc-user-full-name "Alan Pearce"
                   erc-email-userid "alan@alanpearce.co.uk"
@@ -206,6 +206,7 @@
 ;;;; Dates & Times
 
 (req-package calendar
+  :defer t
   :config (progn
             (setq calendar-week-start-day 1)
             (calendar-set-date-style 'iso)))
@@ -230,6 +231,7 @@
 
 ;;;; Directory browsing
 (req-package dired
+  :defer t
   :config (progn
             (bind-key "<return>" #'dired-find-file dired-mode-map)
             (bind-key "^" (lambda () (interactive) (find-alternate-file "..")) dired-mode-map)
@@ -307,6 +309,7 @@
                  (setq save-place-file (expand-file-name ".saveplace" user-emacs-directory))))
 
 (req-package tramp
+  :defer t
   :config (progn
             (setq tramp-default-method (if (eq system-type 'windows-nt) "plinkx" "ssh")
                   tramp-default-user-alist '(("\\`su\\(do\\)?\\'" nil "root"))
@@ -324,11 +327,13 @@
 
 (req-package tramp-sh
   :require tramp
+  :defer t
   :config (progn
             (add-to-list 'tramp-remote-path "/usr/local/sbin")
             (add-to-list 'tramp-remote-path "~/bin")))
 
 (req-package ediff
+  :defer t
   :config (progn
             (setq ediff-split-window-function 'split-window-horizontally
                   ediff-window-setup-function 'ediff-setup-windows-plain)))
@@ -640,6 +645,7 @@
   :init (add-hook 'emacs-lisp-mode-hook #'auto-compile-on-save-mode))
 
 (req-package cc-mode
+  :defer t
   :init (progn
           (add-hook 'c-mode-common-hook #'electric-indent-mode))
   :config (progn
@@ -892,6 +898,7 @@
 
 (req-package redshank
   :diminish " Λ"
+  :defer t
   :init (progn
           (add-hook 'lisp-common-mode-hook #'turn-on-redshank-mode)))
 
@@ -945,6 +952,9 @@
 ;;;; Web Development
 
 (req-package skewer-mode
+  :commands (skewer-mode
+             skewer-html-mode
+             skewer-css-mode)
   :init (progn
           (add-hook 'js2-mode-hook #'skewer-mode)
           (add-hook 'html-mode-hook #'skewer-html-mode)
@@ -979,12 +989,14 @@
             (add-hook 'php-mode-hook #'turn-on-eldoc-mode)))
 
 (req-package sgml-mode
+  :defer t
   :config (setq sgml-basic-offset 4))
 
 (req-package emmet-mode
-  :config (progn
-            (if (functionp 'web-mode)
-                (add-hook 'web-mode-hook #'emmet-mode))))
+  :commands (emmet-mode)
+  :init (progn
+          (if (functionp 'web-mode)
+              (add-hook 'web-mode-hook #'emmet-mode))))
 
 (req-package web-mode
   :mode (("/views/.*\\.php\\'" . web-mode)