The following works:
(define-prefix-command 'my-map) (global-set-key (kbd "C-@") 'my-map) ;; MacOS (global-set-key (kbd "C-SPC") 'my-map) ;; Windows 10
The following does not:
(global-set-key [remap set-mark-command] 'my-map)
It fails with the error that
my-map is not a command (
commandp returns nil).
The emacs manual states that "putting a remapping in a prefix keymap like
ctl-x-map typically has no effect, as such keymaps are not themselves active;" however, I am remapping a command in the active global map to a prefix map. So why does this fail?