Now, if I: - byte-compile this file, - M-: (package-generate-autoloads "testautoload" default-directory) - emacs -Q -L . - M-: (load-file "testautoload-autoloads.el") then: - global-testautoload-mode is t, - the testautoload-mode variable is undefined, - the testautoload-mode-map keymap is undefined. From there, (customize-set-variable 'global-testautoload-mode t) enables the mode in all buffers and the keymap works. Is there a way to do away with this extra step? I've messed with :require and :initialize, but they don't help AFAICT. What does help is adding this snippet at the bottom of my library: