When moving to
use-package, I'd to replace
(require 'markdown-mode) (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
(use-package markdown-mode :mode "\\.md\\'" :config ... )
use-package's documentation on
:defer says it's unneeded when using
Defer loading of a package -- this is implied when using ‘:commands’, ‘:bind’, ‘:bind*’, ‘:mode’, ‘:magic’, ‘:hook’, ‘:magic-fallback’, or ‘:interpreter’. This can be an integer, to force loading after N seconds of idle time, if the package has not already been loaded.
so only when I open a file ending
markdown-mode be loaded and configured.
However, there're extensions where there're
- No additions to
.rsfiles automatically have
- Some additions to
(use-package cc-mode ;; not adding .c, .cpp, .cc, .h, etc. since it's automatically ;; associated to the right cc mode :mode (("\\.inl\\'" . c++-mode) ("\\.mm\\'" . objc-mode)) )
In these cases will
use-package do deferred loading?
When I open a
.c file, I see that the major mode is rightly
c-mode but I don't know if this was early/lazy loaded.