jwiegley / use-package

A use-package declaration for simplifying your .emacs
https://jwiegley.github.io/use-package
GNU General Public License v3.0
4.4k stars 260 forks source link

Put functions in scope in the :config block #1059

Open jyp opened 1 year ago

jyp commented 1 year ago

This fixes #1032, which also provides background.

With this change, use-package p puts in scope all the symbols declared by package p in scope of its :config block. The tradeoff is that init is slightly slower if interpreted. Compiling init.el gives the same runtime behavior as previously.

Perhaps there is a way to change use-package--eval-when-compile to obtain both fewer warnings at compile time and best runtime complexity, but this is beyond my elisp understanding.