nixpkgs/pkgs/build-support/emacs
Daniel Nagy 4489718d8f
emacsWrapper: preload autoloads
This commits changes the Emacs wrapper, in order to preload all autoload
definitions when built with additional packages. The list of all
definitions is generated at build-time. Packages do not need to
be (require)d for them to work.

Before this change, a code like

```sh
nix-shell -I "nixpkgs=$PWD" -p "emacs.pkgs.withPackages(e:[e.magit])" \
          --run "emacs -Q -nw -f magit"
```

will fail with the message `Symbol’s function definition is void: magit`

After the change, the same code above will open Emacs with magit
enabled.

A slightly longer startup time of ~10ms was detected in local, informal
experiments.

More information on autoloading:
https://www.gnu.org/software/emacs/manual/html_node/eintr/Autoload.html
2022-04-17 14:36:24 +02:00
..
buffer.nix
elpa2nix.el
elpa.nix elpa-packages: deprecate phases 2021-08-16 21:34:58 +02:00
emacs-funcs.sh emacs: add currently compiling package dirs to load-path 2021-02-19 16:46:31 +01:00
generic.nix emacs: Ignore large file warnings for native compilation 2021-12-19 08:05:28 -08:00
melpa2nix.el melpa2nix: Ignore large file warnings 2021-12-19 08:07:18 -08:00
melpa.nix Merge pull request #127980 from matthewbauer/darwin-emacs-native-comp 2021-07-15 20:03:57 -05:00
mk-wrapper-subdirs.el emacs: resolve wrapper load-path at build time 2021-11-14 22:31:48 +01:00
trivial.nix emacs.pkgs.trivialBuild: add missing stdenv argument 2021-01-26 16:15:03 +01:00
wrapper.nix emacsWrapper: preload autoloads 2022-04-17 14:36:24 +02:00
wrapper.sh emacsWrapper: preload autoloads 2022-04-17 14:36:24 +02:00