Skip to main content
3 of 4
Edited the Description
enzotib
  • 53.4k
  • 14
  • 126
  • 106

Replace require statements by autoload in .emacs file to improve performance

According to these posts:

one can somehow replace require and load statements in the .emacs file to speed up the emacs start. However I don't know how to do this in detail.

For example I have (among other things) in my .emacs file the following require and load statements:

(load "auctex.el" nil t t)
(require 'alarm)
(require 'linked)
(load "nxhtml/autostart.el")
(require 'autoinsert)
(require 'recentf)
(require 'color-theme)
(load "~/.emacsaddons/emacs-color-theme-solarized/color-theme-solarized")
...

For alarm and linked there are corresponding files in a directory called .emacsaddons, for nxhtml there is a directory, for the others there are no corresponding files in .emacsaddons. I didn't include all require or load statements from my .emacs file in the example above, just a few where I feel that the steps for replacing them with autoload will differ between them (for example because some have el files unter .emacsaddons and some doesn't, or because nxhtml is a subdir of .emacsaddons...).

How are the detailed steps to replace everything by autoload functionality for improving the performance?

student
  • 18.9k
  • 32
  • 113
  • 179