1669 |
that local binding will continue to shadow any global binding |
that local binding will continue to shadow any global binding |
1670 |
that you make with this function." |
that you make with this function." |
1671 |
(interactive "KSet key globally: \nCSet key %s to command: ") |
(interactive "KSet key globally: \nCSet key %s to command: ") |
1672 |
(or (vectorp key) (stringp key) |
(or (vectorp key) (stringp key) (symbolp key) |
1673 |
(signal 'wrong-type-argument (list 'arrayp key))) |
(signal 'wrong-type-argument (list 'arrayp key))) |
1674 |
(define-key (current-global-map) key command)) |
(define-key (current-global-map) key command)) |
1675 |
|
|
1687 |
(let ((map (current-local-map))) |
(let ((map (current-local-map))) |
1688 |
(or map |
(or map |
1689 |
(use-local-map (setq map (make-sparse-keymap)))) |
(use-local-map (setq map (make-sparse-keymap)))) |
1690 |
(or (vectorp key) (stringp key) |
(or (vectorp key) (stringp key) (symbolp key) |
1691 |
(signal 'wrong-type-argument (list 'arrayp key))) |
(signal 'wrong-type-argument (list 'arrayp key))) |
1692 |
(define-key map key command))) |
(define-key map key command))) |
1693 |
|
|