lol

emacs: remove outdated doc about package initialization

Since Emacs 27[1], there is no need to call package-initialize in the
init file.

[1]: https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS.27?id=cae528457cb862dc886a34240c9d4c73035b6659#n227

authored by

Lin Jian and committed by
Anderson Torres
665651c7 71a87531

+2 -27
-4
doc/builders/packages/emacs.section.md
··· 26 26 { 27 27 packageOverrides = pkgs: with pkgs; rec { 28 28 myEmacsConfig = writeText "default.el" '' 29 - ;; initialize package 30 - 31 - (require 'package) 32 - (package-initialize 'noactivate) 33 29 (eval-when-compile 34 30 (require 'use-package)) 35 31
+2 -16
nixos/modules/services/editors/emacs.md
··· 339 339 340 340 ## Configuring Emacs {#module-services-emacs-configuring} 341 341 342 - The Emacs init file should be changed to load the extension packages at 343 - startup: 344 - 345 - ::: {.example #module-services-emacs-package-initialisation} 346 - ### Package initialization in `.emacs` 347 - 348 - ``` 349 - (require 'package) 350 - 351 - ;; optional. makes unpure packages archives unavailable 352 - (setq package-archives nil) 353 - 354 - (setq package-enable-at-startup nil) 355 - (package-initialize) 356 - ``` 357 - ::: 342 + If you want to only use extension packages from Nixpkgs, you can add 343 + `(setq package-archives nil)` to your init file. 358 344 359 345 After the declarative Emacs package configuration has been tested, 360 346 previously downloaded packages can be cleaned up by removing
-7
pkgs/top-level/emacs-packages.nix
··· 7 7 # Alternative: use `emacs`, install everything to a system or user profile 8 8 # and then add this at the start your `init.el`: 9 9 /* 10 - (require 'package) 11 - 12 - ;; optional. makes unpure packages archives unavailable 13 - (setq package-archives nil) 14 - 15 10 ;; optional. use this if you install emacs packages to the system profile 16 11 (add-to-list 'package-directory-list "/run/current-system/sw/share/emacs/site-lisp/elpa") 17 12 18 13 ;; optional. use this if you install emacs packages to user profiles (with nix-env) 19 14 (add-to-list 'package-directory-list "~/.nix-profile/share/emacs/site-lisp/elpa") 20 - 21 - (package-initialize) 22 15 */ 23 16 24 17 { pkgs'