magit/magit — pull request #1035 by Fuco1 (2013-11-06 13:48:20+00:00)
Title: Provide autoloads for `magit-key-mode-popup-*` family of functions

I've bound many of the popup windows to shorter key sequences (so I don't have to access the status view), but they are not autoloaded so I had to go there anyway to force autoload.

This patch provides autoload mechanism for the popup views, dynamically generated from variable `magit-key-mode-groups` (so if you add or remove groups, the autoloads will auto-adjust as well).

This require that this variable is loaded with `magit-autoloads.el` but I suppose that's not a big deal. The code that generates the autoloads themselves is expanded here for clarity (in the source code it must be on one line after the `;;;###autoload` magic token)

```scheme
(mapc (lambda (g)
(eval `(autoload
',(intern (concat "magit-key-mode-popup-"
(symbol-name (car g))))
"magit-key-mode"
,(concat "Key menu for " (symbol-name (car g)))
t)))
magit-key-mode-groups)
```