This overhaul introduces four key changes to the elisp ports infrastructure:
- Remove support for packaged byte-compiled elisp. The primary motivation is to eliminate a large number of flavor-specific packages and to simplify the ports tree. For example, supporting byte-compiled elisp for print/pdf-tools required six packages, one for each flavor of editors/emacs and editors/emacs-devel. With over 100 elisp ports and requests for new Emacs flavors, this was unmanageable.
- Install configuration that integrates with Emacs's native compilation machinery, allowing elisp from ports to be compiled into the standard cache under the user's home directory. This matches the behavior of GNU ELPA packages and generally results in a faster experience. Reported speedups vary depending on the characteristics of the elisp code, but are typically in the range of 2.5 to 5 times faster compared to byte-compiled code.
- Perform byte compilation on the target host, but only when native compilation is unavailable. Compilation is initiated when Emacs starts, and the resulting .elc files are cached under the user's home directory.
- Load all autoloads files installed by FreeBSD elisp ports. This mirrors what package.el does for ELPA packages, ensuring that autoloaded functions are available without requiring users to explicitly load each package.
Key changes to individual elisp ports:
- Stop installing .elc files. My first choice was to update the build so no .elc is ever created or put in ${STAGEDIR}, but with over 100 elisp ports, for practical purposes (and my sanity), I had to limit the time I spent on each port. In some cases, I gave up and added a simple post-install target to remove any .elc files from the stage directory. I can revisit this later.
- Update or remove any pkg-message that instructs users to require or load components when the port includes an autoloads file. As with ELPA, autoloads files are now loaded automatically. While here, If I encountered text such as "in your ~/.emacs", I updated it to something more general like "in your Emacs configuration", since ~/.emacs is now considered legacy in favor of ~/.emacs.d/init.el or ~/.config/emacs/init.el.
Elisp port maintainers: I have build-tested everything, but if you could run-test your port(s) to confirm that everything behaves as expected, that would be helpful.