The first you do is make use of the "magic comment". All that is a special format line prior to your defun lines. e.g
- (defun rgr/anything ()
- "default to thing at point for anything"
- (anything nil (region-or-word-at-point)))
- ;; Generate autoload for locally downloaded and developed elisp files
- (defun my-autoloads nil
- "Generate autoloads for code in ~/.emacs.d/."
- (let ((generated-autoload-file "~/.emacs.d/my-autoload.el"))
- (update-directory-autoloads "~/.emacs.d")))
I don't need to mention that you need to load the autoload file do I?
- (require 'my-autoload)