34 |
|
|
35 |
;; Define a Tramp minor mode. It's intention is to redefine some keys for Tramp |
;; Define a Tramp minor mode. It's intention is to redefine some keys for Tramp |
36 |
;; specific functions, like compilation. |
;; specific functions, like compilation. |
37 |
;; The key remapping works since Emacs 22.1 only. Unknown for XEmacs. |
;; The key remapping works since Emacs 22 only. Unknown for XEmacs. |
38 |
|
|
39 |
(when (fboundp 'define-minor-mode) |
(when (fboundp 'define-minor-mode) |
40 |
|
|
59 |
bindings. Otherwise, only bindings active during invocation are taken |
bindings. Otherwise, only bindings active during invocation are taken |
60 |
into account. XEmacs menubar bindings are not changed by this." |
into account. XEmacs menubar bindings are not changed by this." |
61 |
(if (functionp 'command-remapping) |
(if (functionp 'command-remapping) |
62 |
;; Emacs 22.1 |
;; Emacs 22 |
63 |
(eval |
(eval |
64 |
`(define-key tramp-minor-mode-map [remap ,old-command] new-command)) |
`(define-key tramp-minor-mode-map [remap ,old-command] new-command)) |
65 |
;; previous Emacs 21 versions. |
;; previous Emacs versions. |
66 |
(mapcar |
(mapcar |
67 |
'(lambda (x) |
'(lambda (x) |
68 |
(define-key tramp-minor-mode-map x new-command)) |
(define-key tramp-minor-mode-map x new-command)) |