diff options
| author | Juri Linkov | 2008-06-30 19:37:02 +0000 |
|---|---|---|
| committer | Juri Linkov | 2008-06-30 19:37:02 +0000 |
| commit | d455ee85bc09573079c2b91c74195fecf736dd5c (patch) | |
| tree | 15941dc72a7a3042b22dce319cef4964cb9e0b87 | |
| parent | ef705f25740224b52e27ceb66841b48cba23ad9b (diff) | |
| download | emacs-d455ee85bc09573079c2b91c74195fecf736dd5c.tar.gz emacs-d455ee85bc09573079c2b91c74195fecf736dd5c.zip | |
(abbrev-map, narrow-map): New variables.
Bind `C-x a' to `abbrev-map' and `C-x n' to `narrow-map'.
Rebind related commands to these new maps.
(ctl-x-r-map): New variable for rectangle, register and bookmark
keys. Move rectangle keybindings to rect.el and register
keybindings to register.el.
(next-buffer, previous-buffer): Remove C-x prefix and move
keybindings to ctl-x-map.
| -rw-r--r-- | lisp/bindings.el | 66 |
1 files changed, 29 insertions, 37 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el index 3a5a13745de..c09e56ae9a2 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -700,10 +700,13 @@ language you are using." | |||
| 700 | ;These commands are defined in editfns.c | 700 | ;These commands are defined in editfns.c |
| 701 | ;but they are not assigned to keys there. | 701 | ;but they are not assigned to keys there. |
| 702 | (put 'narrow-to-region 'disabled t) | 702 | (put 'narrow-to-region 'disabled t) |
| 703 | (define-key ctl-x-map "nn" 'narrow-to-region) | 703 | |
| 704 | (define-key ctl-x-map "nw" 'widen) | 704 | (defvar narrow-map (make-sparse-keymap) |
| 705 | ;; (define-key ctl-x-map "n" 'narrow-to-region) | 705 | "Keymap for narrowing commands.") |
| 706 | ;; (define-key ctl-x-map "w" 'widen) | 706 | (define-key ctl-x-map "n" narrow-map) |
| 707 | |||
| 708 | (define-key narrow-map "n" 'narrow-to-region) | ||
| 709 | (define-key narrow-map "w" 'widen) | ||
| 707 | 710 | ||
| 708 | ;; Quitting | 711 | ;; Quitting |
| 709 | (define-key global-map "\e\e\e" 'keyboard-escape-quit) | 712 | (define-key global-map "\e\e\e" 'keyboard-escape-quit) |
| @@ -744,10 +747,10 @@ language you are using." | |||
| 744 | (define-key esc-map "!" 'shell-command) | 747 | (define-key esc-map "!" 'shell-command) |
| 745 | (define-key esc-map "|" 'shell-command-on-region) | 748 | (define-key esc-map "|" 'shell-command-on-region) |
| 746 | 749 | ||
| 747 | (define-key global-map [?\C-x right] 'next-buffer) | 750 | (define-key ctl-x-map [right] 'next-buffer) |
| 748 | (define-key global-map [?\C-x C-right] 'next-buffer) | 751 | (define-key ctl-x-map [C-right] 'next-buffer) |
| 749 | (define-key global-map [?\C-x left] 'previous-buffer) | 752 | (define-key ctl-x-map [left] 'previous-buffer) |
| 750 | (define-key global-map [?\C-x C-left] 'previous-buffer) | 753 | (define-key ctl-x-map [C-left] 'previous-buffer) |
| 751 | 754 | ||
| 752 | (let ((map minibuffer-local-map)) | 755 | (let ((map minibuffer-local-map)) |
| 753 | (define-key map "\en" 'next-history-element) | 756 | (define-key map "\en" 'next-history-element) |
| @@ -1089,25 +1092,10 @@ language you are using." | |||
| 1089 | (define-key ctl-x-4-map "m" 'compose-mail-other-window) | 1092 | (define-key ctl-x-4-map "m" 'compose-mail-other-window) |
| 1090 | (define-key ctl-x-5-map "m" 'compose-mail-other-frame) | 1093 | (define-key ctl-x-5-map "m" 'compose-mail-other-frame) |
| 1091 | 1094 | ||
| 1092 | (define-key ctl-x-map "r\C-@" 'point-to-register) | 1095 | |
| 1093 | (define-key ctl-x-map [?r ?\C-\ ] 'point-to-register) | 1096 | (defvar ctl-x-r-map (make-sparse-keymap) |
| 1094 | (define-key ctl-x-map "r " 'point-to-register) | 1097 | "Keymap for subcommands of C-x r.") |
| 1095 | (define-key ctl-x-map "rj" 'jump-to-register) | 1098 | (define-key ctl-x-map "r" ctl-x-r-map) |
| 1096 | (define-key ctl-x-map "rs" 'copy-to-register) | ||
| 1097 | (define-key ctl-x-map "rx" 'copy-to-register) | ||
| 1098 | (define-key ctl-x-map "ri" 'insert-register) | ||
| 1099 | (define-key ctl-x-map "rg" 'insert-register) | ||
| 1100 | (define-key ctl-x-map "rr" 'copy-rectangle-to-register) | ||
| 1101 | (define-key ctl-x-map "rn" 'number-to-register) | ||
| 1102 | (define-key ctl-x-map "r+" 'increment-register) | ||
| 1103 | (define-key ctl-x-map "rc" 'clear-rectangle) | ||
| 1104 | (define-key ctl-x-map "rk" 'kill-rectangle) | ||
| 1105 | (define-key ctl-x-map "rd" 'delete-rectangle) | ||
| 1106 | (define-key ctl-x-map "ry" 'yank-rectangle) | ||
| 1107 | (define-key ctl-x-map "ro" 'open-rectangle) | ||
| 1108 | (define-key ctl-x-map "rt" 'string-rectangle) | ||
| 1109 | (define-key ctl-x-map "rw" 'window-configuration-to-register) | ||
| 1110 | (define-key ctl-x-map "rf" 'frame-configuration-to-register) | ||
| 1111 | 1099 | ||
| 1112 | (define-key esc-map "q" 'fill-paragraph) | 1100 | (define-key esc-map "q" 'fill-paragraph) |
| 1113 | (define-key ctl-x-map "." 'set-fill-prefix) | 1101 | (define-key ctl-x-map "." 'set-fill-prefix) |
| @@ -1127,16 +1115,20 @@ language you are using." | |||
| 1127 | (define-key ctl-x-map "np" 'narrow-to-page) | 1115 | (define-key ctl-x-map "np" 'narrow-to-page) |
| 1128 | ;; (define-key ctl-x-map "p" 'narrow-to-page) | 1116 | ;; (define-key ctl-x-map "p" 'narrow-to-page) |
| 1129 | 1117 | ||
| 1130 | (define-key ctl-x-map "al" 'add-mode-abbrev) | 1118 | (defvar abbrev-map (make-sparse-keymap) |
| 1131 | (define-key ctl-x-map "a\C-a" 'add-mode-abbrev) | 1119 | "Keymap for abbrev commands.") |
| 1132 | (define-key ctl-x-map "ag" 'add-global-abbrev) | 1120 | (define-key ctl-x-map "a" abbrev-map) |
| 1133 | (define-key ctl-x-map "a+" 'add-mode-abbrev) | 1121 | |
| 1134 | (define-key ctl-x-map "aig" 'inverse-add-global-abbrev) | 1122 | (define-key abbrev-map "l" 'add-mode-abbrev) |
| 1135 | (define-key ctl-x-map "ail" 'inverse-add-mode-abbrev) | 1123 | (define-key abbrev-map "\C-a" 'add-mode-abbrev) |
| 1136 | ;; (define-key ctl-x-map "a\C-h" 'inverse-add-global-abbrev) | 1124 | (define-key abbrev-map "g" 'add-global-abbrev) |
| 1137 | (define-key ctl-x-map "a-" 'inverse-add-global-abbrev) | 1125 | (define-key abbrev-map "+" 'add-mode-abbrev) |
| 1138 | (define-key ctl-x-map "ae" 'expand-abbrev) | 1126 | (define-key abbrev-map "ig" 'inverse-add-global-abbrev) |
| 1139 | (define-key ctl-x-map "a'" 'expand-abbrev) | 1127 | (define-key abbrev-map "il" 'inverse-add-mode-abbrev) |
| 1128 | ;; (define-key abbrev-map "\C-h" 'inverse-add-global-abbrev) | ||
| 1129 | (define-key abbrev-map "-" 'inverse-add-global-abbrev) | ||
| 1130 | (define-key abbrev-map "e" 'expand-abbrev) | ||
| 1131 | (define-key abbrev-map "'" 'expand-abbrev) | ||
| 1140 | ;; (define-key ctl-x-map "\C-a" 'add-mode-abbrev) | 1132 | ;; (define-key ctl-x-map "\C-a" 'add-mode-abbrev) |
| 1141 | ;; (define-key ctl-x-map "\+" 'add-global-abbrev) | 1133 | ;; (define-key ctl-x-map "\+" 'add-global-abbrev) |
| 1142 | ;; (define-key ctl-x-map "\C-h" 'inverse-add-mode-abbrev) | 1134 | ;; (define-key ctl-x-map "\C-h" 'inverse-add-mode-abbrev) |