I'm reorganising my init.el
a bit and I've realised that it contains the following set of use-package
declarations: (simplified slightly)
(use-package hasky-extensions
:config
(general-define-key
:states '(normal visual insert emacs)
:keymap 'haskell-mode-map
:prefix "K"
:non-normal-prefix "C-)"
"xx" 'hasky-extensions
"xd" 'hasky-extensions-browse-docs
"hh" 'hoogle
"hH" 'haskell-hoogle-lookup-from-local))
;; ...
;; then, a bit later:
(use-package general)
Arguably this shouldn't work, as general-define-key
is called before general
is require
d through the use-package
declaration. However, it turns out to work just fine - I get no errors and can use all the keybindings I have defined. Why does this work?