Разница в том, что (global-set-key)
или (local-set-key)
выяснит для вас глобальную / локальную карту (до вызова (define-key)
).
Редактировать Вы можете использовать M-x describe-function
для (global-set-key)
(global-set-key key command)
Give key a global binding as command.
command is the command definition to use; usually it is
a symbol naming an interactively-callable function.
key is a key sequence; noninteractively, it is a string or vector
of characters or event types, and non-ASCII characters with codes
above 127 (such as ISO Latin-1) can be included if you use a vector.
А для (define-key)
(define-key keymap key def)
In keymap, define key sequence key as def.
keymap is a keymap.
key is a string or a vector of symbols and characters meaning a
sequence of keystrokes and events. Non-ASCII characters with codes
above 127 (such as ISO Latin-1) can be included if you use a vector.
Using [t] for key creates a default definition, which applies to any
event type that has no other definition in this keymap.