3.7.2 Setting up autoloads manually

Packages often document how to set up its autoloads when it is being manually installed. If it does, follow those instructions. Otherwise, you might want to set them up manually.

To autoload an interactive command, use the :commands keyword, which takes either a symbol or a list of symbols as its argument. It creates autoloads for those commands (which defers loading of the module until those commands are used).

The :autoload keyword takes the same arguments as :commands, but is used to autoload non-interactive functions. Here is an example:

(use-package org-crypt
  :autoload org-crypt-use-before-save-magic)