fset sets a symbol's function definition.
projectile-command-map is used as a prefix command. A prefix command is a symbol whose function definition is a keymap.
The definition of a prefix key is usually the keymap to use for looking up the following event. The definition can also be a Lisp symbol whose function definition is the following keymap; the effect is the same, but it provides a command name for the prefix key that can be used as a description of what the prefix key is for.
This can also be done with
What's a bit confusing here is that the same symbol,
projectile-command-map, is being used for two purposes:
- As a keymap
- As a prefix command
Another example may be clearer:
(fset 'help-command help-map)
help-command is clearly a prefix command, while
help-map is a keymap.