La differenza è che (global-set-key)
o (local-set-key)
trovare la mappa globale/locale per voi (prima di chiamare (define-key)
).
Modifica È possibile utilizzare M-x describe-function
per (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.
E per (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.
fonte
2010-08-25 16:01:37