It is not packages that use-package
loads but features (which are things you can require
and test for with featurep
). From this point of view, use-package
is essentially a fancy wrapper for require
.
While use-package
can often seem like magic, you can demystify by placing point after a use-package
stanza and doing M-x pp-macroexpand-last-sexp
. In the case you reference, macro-expanding
(use-package emacs
:delight
(auto-fill-function " AF")
(visual-line-mode))
yields
(if
(not
(require 'emacs nil t))
(display-warning 'use-package
(format "Cannot load %s" 'emacs)
:error)
(if
(fboundp 'delight)
(delight
'((auto-fill-function " AF" emacs)
(visual-line-mode nil emacs)))))
wrapped in some error-checking, messages and timing.
This is helpful: you can use the nice use-package
interface to configure built-in things like dired
.