annotate lisp/keydefs.el @ 223:2c611d1463a6 r20-4b10

Import from CVS: tag r20-4b10
author cvs
date Mon, 13 Aug 2007 10:10:54 +0200
parents 41ff10fd062f
children 0e522484dd2a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
1 ;;; keydefs.el --- Define standard keybindings.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
2
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
3 ;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
4
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
5 ;; Maintainer: XEmacs Development Team
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
6 ;; Keywords: internal, dumped
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
7
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
8 ;; This file is part of XEmacs.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
9
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
10 ;; XEmacs is free software; you can redistribute it and/or modify it
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
11 ;; under the terms of the GNU General Public License as published by
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
13 ;; any later version.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
14
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
15 ;; XEmacs is distributed in the hope that it will be useful, but
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
18 ;; General Public License for more details.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
19
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
21 ;; along with XEmacs; see the file COPYING. If not, write to the
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
22 ;; Free Software Foundation, 59 Temple Place - Suite 330,
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
23 ;; Boston, MA 02111-1307, USA.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
24
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
25 ;; All the global bindings should be here so that one can reload things
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
26 ;; like files.el without trashing one's personal bindings.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
27
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
28 ;;; Synched up with: Not synched with FSF.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
29
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
30 ;;; Commentary:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
31
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
32 ;; This file is dumped with XEmacs
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
33
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
34 ;;; Code:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
35
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
36 ;; created by C code
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
37 (defvar global-map (current-global-map) "\
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
38 Default global keymap mapping XEmacs keyboard input into commands.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
39 The value is a keymap which is usually (but not necessarily) XEmacs's
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
40 global map.")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
41
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
42 ;; created by C code
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
43 (defvar esc-map (symbol-function 'ESC-prefix) "\
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
44 Default keymap for ESC (meta) commands.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
45 The normal global definition of the character ESC indirects to this keymap.")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
46
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
47 (set-keymap-name global-map 'global-map)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
48 (set-keymap-name esc-map 'ESC-prefix)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
49
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
50 (define-prefix-command 'Control-X-prefix t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
51 (defvar ctl-x-map (symbol-function 'Control-X-prefix) "\
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
52 Default keymap for C-x commands.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
53 The normal global definition of the character C-x indirects to this keymap.")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
54 (define-key global-map "\C-x" 'Control-X-prefix)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
55
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
56 (define-prefix-command 'ctl-x-4-prefix t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
57 (defvar ctl-x-4-map (symbol-function 'ctl-x-4-prefix) "\
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
58 Keymap for subcommands of C-x 4")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
59 (define-key global-map "\C-x4" 'ctl-x-4-prefix)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
60
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
61 (define-prefix-command 'ctl-x-5-prefix t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
62 (defvar ctl-x-5-map (symbol-function 'ctl-x-5-prefix) "\
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
63 Keymap for subcommands of C-x 5")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
64 (define-key global-map "\C-x5" 'ctl-x-5-prefix)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
65
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
66 (define-prefix-command 'mode-specific-command-prefix t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
67 (defvar mode-specific-map (symbol-function 'mode-specific-command-prefix) "\
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
68 Keymap for characters following C-c.")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
69 (define-key global-map "\C-c" 'mode-specific-command-prefix)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
70
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
71 ;; FSFmacs buffer.c
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
72
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
73 (define-key global-map "\C-xb" 'switch-to-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
74 (define-key global-map "\C-xk" 'kill-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
75 (define-key global-map "\C-x\C-b" 'list-buffers)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
76 (put 'erase-buffer 'disabled t) ;from buffer.c
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
77
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
78 ;; FSFmacs casefiddle.c
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
79
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
80 (define-key global-map "\C-x\C-u" 'upcase-region)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
81 ;; This is silly with zmacs regions
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
82 ;(put 'upcase-region 'disabled t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
83 (define-key global-map "\C-x\C-l" 'downcase-region)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
84 ;; This is silly with zmacs regions
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
85 ;(put 'downcase-region 'disabled t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
86 (define-key global-map "\M-u" 'upcase-region-or-word)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
87 (define-key global-map "\M-l" 'downcase-region-or-word)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
88 (define-key global-map "\M-c" 'capitalize-region-or-word)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
89
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
90 ;; FSFmacs cmds.c
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
91
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
92 (let ((n 33))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
93 (while (<= n 255)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
94 (if (not (= n 127))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
95 (define-key global-map n 'self-insert-command))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
96 (setq n (1+ n))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
97 (define-key global-map " " 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
98
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
99 (define-key global-map "\C-a" 'beginning-of-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
100 (define-key global-map "\C-b" 'backward-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
101 (define-key global-map "\C-e" 'end-of-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
102 (define-key global-map "\C-f" 'forward-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
103 (define-key global-map "\C-d" 'delete-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
104 (define-key global-map 'delete 'backward-or-forward-delete-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
105 (define-key global-map '(meta delete) 'backward-or-forward-kill-word)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
106 (define-key global-map [(control x) (delete)] 'backward-or-forward-kill-sentence)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
107
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
108 ;; FSFmacs files.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
109
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
110 (define-key global-map "\C-x\C-f" 'find-file)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
111 (define-key global-map "\C-x\C-q" 'toggle-read-only)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
112 (define-key global-map "\C-x\C-r" 'find-file-read-only)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
113 (define-key global-map "\C-x\C-v" 'find-alternate-file)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
114 (define-key global-map "\C-x\C-s" 'save-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
115 (define-key global-map "\C-xs" 'save-some-buffers)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
116 (define-key global-map "\C-x\C-w" 'write-file)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
117 (define-key global-map "\C-xi" 'insert-file)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
118 (define-key global-map "\M-~" 'not-modified)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
119 (define-key global-map "\C-x\C-d" 'list-directory)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
120 (define-key global-map "\C-x\C-c" 'save-buffers-kill-emacs)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
121
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
122 (define-key global-map "\C-x4f" 'find-file-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
123 (define-key global-map "\C-x4r" 'find-file-read-only-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
124 (define-key global-map "\C-x4\C-f" 'find-file-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
125 (define-key global-map "\C-x4b" 'switch-to-buffer-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
126 (define-key global-map "\C-x4\C-o" 'display-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
127
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
128 (define-key global-map "\C-x5b" 'switch-to-buffer-other-frame)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
129 (define-key global-map "\C-x5f" 'find-file-other-frame)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
130 (define-key global-map "\C-x5\C-f" 'find-file-other-frame)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
131 (define-key global-map "\C-x5r" 'find-file-read-only-other-frame)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
132
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
133 ;; FSFmacs frame.c
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
134 ;FSFmacs has these. It's probably a good idea to provide ways of hooking
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
135 ;these events, but it's unlikely that it's a good idea to do it this way.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
136 ;Just provide a hook, like the existing `select-frame-hook',
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
137 ;`deselect-frame-hook', `map-frame-hook', and `unmap-frame-hook'.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
138 ;#### ergo need hooks for delete-frame and iconify-frame
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
139 ;(define-key global-map 'switch-frame 'handle-switch-frame)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
140 ;(define-key global-map 'delete-frame 'handle-delete-frame)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
141 ;(define-key global-map 'iconify-frame 'ignore-event)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
142 ;(define-key global-map 'make-frame-visible 'ignore-event)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
143
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
144 ;; FSFmacs frame.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
145
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
146 ;; New FSF19 bindings: C-x 5 as prefix for window commands
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
147 (define-key global-map "\C-x52" 'make-frame)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
148 (define-key global-map "\C-x50" 'delete-frame)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
149 (define-key global-map "\C-x5o" 'other-frame)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
150
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
151 ;; FSFmacs help.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
152
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
153 (define-key global-map (vector help-char) 'help-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
154 (define-key global-map 'help 'help-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
155 (define-key global-map 'f1 'help-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
156
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
157 ;; FSFmacs indent.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
158
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
159 ;;(define-key global-map "\t" 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
160 (define-key global-map "\t" 'indent-for-tab-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
161 (define-key global-map "\M-\C-\\" 'indent-region)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
162 (define-key global-map "\C-x\t" 'indent-rigidly)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
163 (define-key global-map "\M-i" 'tab-to-tab-stop)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
164 ;; XEmacs addition:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
165 (define-key global-map [(shift tab)] 'tab-to-tab-stop)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
166
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
167 ;; FSFmacs isearch.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
168
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
169 (define-key global-map "\C-s" 'isearch-forward)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
170 (define-key global-map "\C-r" 'isearch-backward)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
171 (define-key global-map "\M-\C-s" 'isearch-forward-regexp)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
172 (define-key global-map "\M-\C-r" 'isearch-backward-regexp)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
173
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
174 ;; FSFmacs keyboard.c
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
175
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
176 (define-key global-map "\C-z" 'suspend-emacs-or-iconify-frame)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
177 (define-key global-map "\C-x\C-z" 'suspend-or-iconify-emacs)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
178
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
179 ;; FSFmacs loaddefs.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
180
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
181 ;; New FSF19 bindings: C-x n as a prefix for narrowing commands.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
182 (define-key global-map "\C-xn" (let ((map (make-sparse-keymap)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
183 (set-keymap-name map 'narrowing-prefix)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
184 map))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
185 (put 'narrow-to-region 'disabled t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
186 (define-key global-map "\C-xnn" 'narrow-to-region)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
187 (define-key global-map "\C-xnw" 'widen)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
188 (define-key global-map "\C-xnd" 'narrow-to-defun)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
189 ;; Old v18 bindings
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
190 ;(define-key global-map "\C-xn" 'narrow-to-region)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
191 ;(define-key global-map "\C-xw" 'widen)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
192
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
193 (define-key global-map "\C-j" 'newline-and-indent)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
194 (define-key global-map "\C-m" 'newline)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
195 (define-key global-map "\C-o" 'open-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
196 (define-key global-map "\M-\C-o" 'split-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
197 (define-key global-map "\C-q" 'quoted-insert)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
198 (define-key global-map "\M-^" 'delete-indentation)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
199 (define-key global-map "\M-\\" 'delete-horizontal-space)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
200 (define-key global-map "\M-m" 'back-to-indentation)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
201 (define-key global-map "\C-x\C-o" 'delete-blank-lines)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
202 (define-key global-map "\M- " 'just-one-space)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
203 (define-key global-map "\M-z" 'zap-to-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
204 (define-key global-map "\M-=" 'count-lines-region)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
205 (define-key global-map "\C-x=" 'what-cursor-position)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
206 (define-key global-map "\M-:" 'eval-expression)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
207 ;; Define ESC ESC : like ESC : for people who type ESC ESC out of habit.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
208 (define-key global-map "\M-\e:" 'eval-expression)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
209 ;(define-key global-map "\M-\e" 'eval-expression)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
210 ;; Do we really need to disable this now that it is harder to type
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
211 ;; by accident?
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
212 ;; (put 'eval-expression 'disabled t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
213 ;; Changed from C-x ESC so that function keys work following C-x.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
214 (define-key global-map "\C-x\e\e" 'repeat-complex-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
215 ;(define-key global-map "\C-x\e" 'repeat-complex-command)
223
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 209
diff changeset
216 ;; From Emacs 20.
2c611d1463a6 Import from CVS: tag r20-4b10
cvs
parents: 209
diff changeset
217 (define-key global-map "\C-x\M-:" 'repeat-complex-command)
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
218 (define-key global-map "\C-xu" 'advertised-undo)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
219 ;; Many people are used to typing C-/ on X terminals and getting C-_.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
220 (define-key global-map '(control /) 'undo)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
221 (define-key global-map "\C-_" 'undo)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
222 (define-key global-map "\M-!" 'shell-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
223 (define-key global-map "\M-|" 'shell-command-on-region)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
224
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
225 (define-key global-map "\C-u" 'universal-argument)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
226 ;; Make Control-0 - Control-9 set the prefix argument, like Meta-0.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
227 (let ((i ?0))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
228 (while (<= i ?9)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
229 (define-key global-map (list 'meta i) 'digit-argument)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
230 (define-key global-map (list 'control i) 'digit-argument)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
231 (define-key global-map (list 'control 'meta i) 'digit-argument)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
232 (setq i (1+ i))))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
233 (define-key global-map '(meta -) 'negative-argument)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
234 (define-key global-map '(control -) 'negative-argument)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
235 (define-key global-map '(control meta -) 'negative-argument)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
236
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
237 (define-key global-map "\C-k" 'kill-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
238 (define-key global-map "\C-w" 'kill-region)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
239 (define-key global-map "\M-w" 'kill-ring-save)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
240 (define-key global-map "\M-\C-w" 'append-next-kill)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
241 (define-key global-map "\C-y" 'yank)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
242 (define-key global-map "\M-y" 'yank-pop)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
243
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
244 ;; Old v18 binding
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
245 ;(define-key global-map "\C-xa" 'append-to-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
246
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
247 (define-key global-map "\C-@" 'set-mark-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
248 ;; Many people are used to typing C-SPC and getting C-@.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
249 (define-key global-map '(control ? ) 'set-mark-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
250 (define-key global-map "\C-x\C-x" 'exchange-point-and-mark)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
251 (define-key global-map "\C-x\C-@" 'pop-global-mark)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
252 (define-key global-map [(control x) (control ? )] 'pop-global-mark)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
253
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
254 (define-key global-map "\C-n" 'next-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
255 (define-key global-map "\C-p" 'previous-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
256 ;(define-key global-map "\C-x\C-n" 'set-goal-column)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
257 ;; XEmacs:
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
258 ;;; Many people have said they rarely use this feature, and often type
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
259 ;;; it by accident. Maybe it shouldn't even be on a key.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
260 ;;; Done. -hniksic
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
261 ;(put 'set-goal-column 'disabled t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
262
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
263 (define-key global-map [menu] 'execute-extended-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
264 (define-key global-map [find] 'search-forward)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
265
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
266 (define-key global-map "\C-t" 'transpose-chars)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
267 (define-key global-map "\M-t" 'transpose-words)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
268 (define-key global-map "\M-\C-t" 'transpose-sexps)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
269 (define-key global-map "\C-x\C-t" 'transpose-lines)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
270
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
271 (define-key global-map "\M-;" 'indent-for-comment)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
272 (define-key global-map "\M-j" 'indent-new-comment-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
273 (define-key global-map "\M-\C-j" 'indent-new-comment-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
274 (define-key global-map "\C-x;" 'set-comment-column)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
275 (define-key global-map "\C-xf" 'set-fill-column)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
276 (define-key global-map "\C-x$" 'set-selective-display)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
277
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
278 (define-key global-map "\M-@" 'mark-word)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
279 (define-key global-map "\M-f" 'forward-word)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
280 (define-key global-map "\M-b" 'backward-word)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
281 (define-key global-map "\M-d" 'kill-word)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
282
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
283 (define-key global-map "\M-<" 'beginning-of-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
284 (define-key global-map "\M->" 'end-of-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
285 (define-key global-map "\C-xh" 'mark-whole-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
286 (define-key global-map "\M-\\" 'delete-horizontal-space)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
287
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
288 (define-key global-map "\M-\C-f" 'forward-sexp)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
289 (define-key global-map "\M-\C-b" 'backward-sexp)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
290 (define-key global-map "\M-\C-u" 'backward-up-list)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
291 (define-key global-map "\M-\C-@" 'mark-sexp)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
292 (define-key global-map "\M-\C-d" 'down-list)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
293 (define-key global-map "\M-\C-k" 'kill-sexp)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
294 (define-key global-map "\M-\C-n" 'forward-list)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
295 (define-key global-map "\M-\C-p" 'backward-list)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
296 (define-key global-map "\M-\C-a" 'beginning-of-defun)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
297 (define-key global-map "\M-\C-e" 'end-of-defun)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
298 (define-key global-map "\M-\C-h" 'mark-defun)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
299 (define-key global-map "\M-\(" 'insert-parentheses)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
300 (define-key global-map "\M-\)" 'move-past-close-and-reindent)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
301 (define-key global-map "\M-\t" 'lisp-complete-symbol)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
302
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
303 (define-key global-map '(control meta backspace) 'backward-kill-sexp)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
304 (define-key global-map '(control meta delete) 'backward-or-forward-kill-sexp)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
305
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
306
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
307 (define-key global-map "\C-x/" 'point-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
308 (define-key global-map "\C-xj" 'jump-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
309 (define-key global-map "\C-xx" 'copy-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
310 (define-key global-map "\C-xg" 'insert-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
311 ;; Old v18 binding
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
312 ;(define-key global-map "\C-xr" 'copy-rectangle-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
313
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
314 ;; New FSF19 bindings: C-x r as a prefix for register commands
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
315 (define-key global-map "\C-xr" (let ((map (make-sparse-keymap)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
316 (set-keymap-name map 'rectangle-prefix)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
317 map))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
318 (define-key global-map "\C-xr\C-@" 'point-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
319 (define-key global-map "\C-xr " 'point-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
320 (define-key global-map "\C-xrj" 'jump-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
321 (define-key global-map "\C-xrs" 'copy-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
322 (define-key global-map "\C-xrx" 'copy-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
323 (define-key global-map "\C-xri" 'insert-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
324 (define-key global-map "\C-xrg" 'insert-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
325 (define-key global-map "\C-xrr" 'copy-rectangle-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
326 (define-key global-map "\C-xrc" 'clear-rectangle)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
327 (define-key global-map "\C-xrk" 'kill-rectangle)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
328 (define-key global-map "\C-xry" 'yank-rectangle)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
329 (define-key global-map "\C-xro" 'open-rectangle)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
330 (define-key global-map "\C-xrt" 'string-rectangle)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
331 (define-key global-map "\C-xrw" 'window-configuration-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
332 ;(define-key global-map "\C-xrf" 'frame-configuration-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
333
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
334 (define-key global-map "\M-q" 'fill-paragraph-or-region)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
335 ;(define-key global-map "\M-q" 'fill-paragraph)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
336 ;(define-key global-map "\M-g" 'fill-region) ;now bound to goto-line
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
337 (define-key global-map "\C-x." 'set-fill-prefix)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
338
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
339 ; Using {} instead of [] is 1) FSF compatible and 2) allows function
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
340 ; keys to work on ttys. M-[ is the beginning of most the function key
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
341 ; sequences.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
342 (define-key global-map "\M-{" 'backward-paragraph)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
343 (define-key global-map "\M-}" 'forward-paragraph)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
344 (define-key global-map "\M-h" 'mark-paragraph)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
345 (define-key global-map "\M-a" 'backward-sentence)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
346 (define-key global-map "\M-e" 'forward-sentence)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
347 (define-key global-map "\M-k" 'kill-sentence)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
348 ;;(define-key global-map "\C-x\177" 'backward-kill-sentence)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
349
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
350 (define-key global-map "\C-x[" 'backward-page)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
351 (define-key global-map "\C-x]" 'forward-page)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
352 (define-key global-map "\C-x\C-p" 'mark-page)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
353 (define-key global-map "\C-xl" 'count-lines-page)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
354 (define-key global-map "\C-xnp" 'narrow-to-page)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
355 ;; Old v18 bindings
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
356 ;(define-key global-map "\C-xp" 'narrow-to-page)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
357 (put 'narrow-to-page 'disabled t)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
358
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
359 ;; Old v18 bindings
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
360 ;(define-key global-map "\C-x\C-a" 'add-mode-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
361 ;(define-key global-map "\C-x+" 'add-global-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
362 ;(define-key global-map "\C-x\C-h" 'inverse-add-mode-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
363 ;(define-key global-map "\C-x-" 'inverse-add-global-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
364
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
365 (define-key global-map "\M-'" 'abbrev-prefix-mark)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
366 (define-key global-map "\C-x'" 'expand-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
367
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
368 ;; New FSF19 bindings: C-x a as a prefix for abbrev commands
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
369 (define-key global-map "\C-xal" 'add-mode-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
370 (define-key global-map "\C-xa\C-a" 'add-mode-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
371 (define-key global-map "\C-xag" 'add-global-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
372 (define-key global-map "\C-xa+" 'add-mode-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
373 (define-key global-map "\C-xaig" 'inverse-add-global-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
374 (define-key global-map "\C-xail" 'inverse-add-mode-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
375 (define-key global-map "\C-xa-" 'inverse-add-global-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
376 (define-key global-map "\C-xae" 'expand-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
377 (define-key global-map "\C-xa'" 'expand-abbrev)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
378
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
379 (define-key global-map "\M-\C-l" 'switch-to-other-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
380
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
381 ;; Default binding of "Backspace" is no longer the same as delete.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
382 ;; Default binding of "Control-h" is help.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
383 (define-key global-map 'backspace 'delete-backward-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
384 (define-key global-map '(meta backspace) 'backward-kill-word)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
385
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
386 (define-key global-map "\M-\C-z" 'activate-region)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
387
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
388 ;; FSFmacs macros.c
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
389
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
390 (define-key global-map "\C-xe" 'call-last-kbd-macro)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
391 (define-key global-map "\C-x\(" 'start-kbd-macro)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
392 (define-key global-map "\C-x\)" 'end-kbd-macro)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
393
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
394 ;; FSFmacs macros.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
395
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
396 (define-key global-map "\C-xq" 'kbd-macro-query)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
397
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
398
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
399 ;; FSFmacs minibuffer.c
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
400 ; see also minibuf.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
401
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
402 (define-key global-map "\M-\C-c" 'exit-recursive-edit)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
403 (define-key global-map "\C-]" 'abort-recursive-edit)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
404 (define-key global-map "\M-x" 'execute-extended-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
405
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
406 ;; FSFmacs window.c
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
407
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
408 (define-key global-map "\C-x0" 'delete-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
409 (define-key global-map "\C-x1" 'delete-other-windows)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
410 (define-key global-map "\C-x2" 'split-window-vertically)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
411 (define-key global-map "\C-x3" 'split-window-horizontally)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
412 ;; Old XEmacs binding
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
413 ;;(define-key global-map "\C-x5" 'split-window-horizontally)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
414 (define-key global-map "\C-xo" 'other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
415 (define-key global-map "\C-x^" 'enlarge-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
416 (define-key global-map "\C-x<" 'scroll-left)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
417 (define-key global-map "\C-x>" 'scroll-right)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
418
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
419 (define-key global-map "\C-v" 'scroll-up)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
420 (define-key global-map "\M-v" 'scroll-down)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
421 (define-key global-map "\M-\C-v" 'scroll-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
422 ; meta-shift-V, that is.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
423 (define-key global-map '(meta V) 'scroll-other-window-down)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
424
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
425 (define-key global-map "\C-l" 'recenter)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
426 (define-key global-map "\M-r" 'move-to-window-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
427
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
428 ;; FSFmacs window.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
429
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
430 (define-key global-map "\C-x6" 'window-configuration-to-register)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
431 ;(define-key global-map "\C-x7" 'jump-to-register);ie register-to-window-config
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
432 (define-key global-map "\C-x}" 'enlarge-window-horizontally)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
433 (define-key global-map "\C-x{" 'shrink-window-horizontally)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
434 ;; New FSF19 bindings
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
435 (define-key global-map "\C-x-" 'shrink-window-if-larger-than-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
436 (define-key global-map "\C-x+" 'balance-windows)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
437 (define-key ctl-x-4-map "0" 'kill-buffer-and-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
438
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
439 ;;(define-key global-map "\C-g" 'keyboard-quit)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
440 (let ((ch (quit-char)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
441 (if (or (characterp ch) (integerp ch))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
442 (setq ch (char-to-string ch)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
443 (define-key global-map ch 'keyboard-quit))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
444 (define-key global-map "\e\e\e" 'keyboard-escape-quit)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
445
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
446
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
447
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
448
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
449
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
450
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
451 (define-key global-map "\M-%" 'query-replace)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
452
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
453
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
454 ; autoloaded
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
455 ;(define-key global-map "\C-x4a" 'add-change-log-entry-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
456
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
457 ; autoloaded
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
458 ;(define-key global-map "\C-x`" 'next-error)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
459
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
460 ; autoloaded
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
461 ;(define-key global-map "\M-/" 'dabbrev-expand)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
462
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
463 ; autoloaded
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
464 ;(define-key global-map "\C-xd" 'dired)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
465
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
466 ; autoloaded
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
467 ;(define-key global-map "\C-x4d" 'dired-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
468
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
469 (define-key global-map "\M-$" 'ispell-word)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
470
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
471 (define-key global-map "\C-xm" 'compose-mail)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
472 (define-key global-map "\C-x4m" 'compose-mail-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
473 (define-key global-map "\C-x5m" 'compose-mail-other-frame)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
474
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
475 (define-key global-map "\M-." 'find-tag)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
476
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
477 (define-key global-map "\C-x4." 'find-tag-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
478
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
479 (define-key global-map "\M-," 'tags-loop-continue)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
480
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
481
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
482 (define-key global-map '(control <) 'mark-beginning-of-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
483 (define-key global-map '(control >) 'mark-end-of-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
484
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
485 (define-key global-map "\C-x\C-e" 'eval-last-sexp) ;bogus!
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
486
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
487
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
488 (define-key global-map "\M-g" 'goto-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
489
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
490 ;; Keypad type things
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
491
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
492 ;; I removed all the fkey crap, because where-is is now smart enough
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
493 ;; to show all bindings. --ben
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
494
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
495 ;;; These aren't bound to kbd macros like "\C-b" so that they have the
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
496 ;; expected behavior even in, for example, vi-mode.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
497
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
498 ;; We use here symbolic names, assuming that the corresponding keys will
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
499 ;; generate these keysyms. This is not true on Suns, but x-win-sun.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
500 ;; fixes that. If it turns out that the semantics of these keys should
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
501 ;; differ from server to server, this should be moved into server-specific
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
502 ;; files, but these appear to be the standard Motif and PC bindings.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
503
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
504 ;; movement by units
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
505 (define-key global-map 'left 'backward-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
506 (define-key global-map 'up 'previous-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
507 (define-key global-map 'right 'forward-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
508 (define-key global-map 'down 'next-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
509
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
510 ;; movement by pages
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
511 (define-key global-map 'prior 'scroll-down)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
512 (define-key global-map 'next 'scroll-up)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
513
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
514 ;; movement to the limits
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
515 (define-key global-map 'home 'beginning-of-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
516 (define-key global-map 'end 'end-of-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
517
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
518 ;;; Miscellaneous key bindings
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
519 (define-key global-map 'again 'repeat-complex-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
520 (define-key global-map 'insert 'overwrite-mode)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
521
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
522 ;;; These aren't bound to kbd macros like "\C-b" so that they have the
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
523 ;; expected behavior even in, for example, vi-mode.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
524
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
525 ;; We use here symbolic names, assuming that the corresponding keys will
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
526 ;; generate these keysyms. This is not true on Suns, but x-win-sun.el
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
527 ;; fixes that. If it turns out that the semantics of these keys should
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
528 ;; differ from server to server, this should be moved into server-specific
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
529 ;; files, but these appear to be the standard Motif and PC bindings.
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
530
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
531 ;; potential R6isms
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
532 (define-key global-map 'kp-left 'backward-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
533 (define-key global-map 'kp-up 'previous-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
534 (define-key global-map 'kp-right 'forward-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
535 (define-key global-map 'kp-down 'next-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
536
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
537
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
538 ;; movement by larger blocks
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
539 (define-key global-map '(control left) 'backward-word)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
540 (define-key global-map '(control up) #'(lambda ()
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
541 (interactive "_")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
542 (forward-line -6)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
543 (define-key global-map '(control right) 'forward-word)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
544 (define-key global-map '(control down) #'(lambda ()
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
545 (interactive "_")
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
546 (forward-line 6)))
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
547
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
548 ;; context-sensitive movement
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
549 (define-key global-map '(meta left) 'backward-sexp)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
550 (define-key global-map '(meta right) 'forward-sexp)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
551 (define-key global-map '(meta up) 'backward-paragraph)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
552 (define-key global-map '(meta down) 'forward-paragraph)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
553
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
554 ;; movement by pages
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
555 (define-key global-map '(control prior) 'scroll-right)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
556 (define-key global-map '(control next) 'scroll-left)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
557 ;; potential R6isms
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
558 (define-key global-map 'kp-prior 'scroll-down)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
559 (define-key global-map 'kp-next 'scroll-up)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
560 (define-key global-map '(control kp-prior) 'scroll-right)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
561 (define-key global-map '(control kp-next) 'scroll-left)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
562
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
563
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
564 ;; movement to the limits
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
565 (define-key global-map '(control home) 'beginning-of-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
566 (define-key global-map '(control end) 'end-of-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
567 (define-key global-map 'begin 'beginning-of-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
568 (define-key global-map '(control begin) 'beginning-of-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
569 ;; potential R6isms
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
570 (define-key global-map 'kp-home 'beginning-of-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
571 (define-key global-map '(control kp-home) 'beginning-of-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
572 (define-key global-map 'kp-end 'end-of-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
573 (define-key global-map '(control kp-end) 'end-of-buffer)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
574
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
575 ;; movement between windows
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
576 (define-key global-map '(control tab) 'other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
577 (define-key global-map '(control shift tab) 'backward-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
578
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
579 ;; movement in other windows
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
580 (define-key global-map '(meta next) 'scroll-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
581 (define-key global-map '(meta prior) 'scroll-other-window-down)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
582 (define-key global-map '(meta home) 'beginning-of-buffer-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
583 (define-key global-map '(meta end) 'end-of-buffer-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
584 ;; potential R6isms
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
585 (define-key global-map '(meta kp-next) 'scroll-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
586 (define-key global-map '(meta kp-prior) 'scroll-other-window-down)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
587 (define-key global-map '(meta kp-home) 'beginning-of-buffer-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
588 (define-key global-map '(meta kp-end) 'end-of-buffer-other-window)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
589
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
590 ;; potential R6isms
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
591 (define-key global-map 'redo 'repeat-complex-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
592 (define-key global-map 'kp-insert 'overwrite-mode)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
593 (define-key global-map 'kp-delete 'backward-delete-char-untabify)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
594
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
595 (define-key global-map 'kp-enter [return]) ; do whatever RET does now
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
596 (define-key global-map 'kp-tab [tab])
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
597
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
598 (define-key global-map 'undo 'undo)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
599 (define-key global-map 'help 'help-for-help)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
600
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
601 (define-key global-map 'kp-space 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
602 (define-key global-map 'kp-equal 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
603 (define-key global-map 'kp-multiply 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
604 (define-key global-map 'kp-add 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
605 (define-key global-map 'kp-separator 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
606 (define-key global-map 'kp-subtract 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
607 (define-key global-map 'kp-decimal 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
608 (define-key global-map 'kp-divide 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
609
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
610 (define-key global-map 'kp-0 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
611 (define-key global-map 'kp-1 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
612 (define-key global-map 'kp-2 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
613 (define-key global-map 'kp-3 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
614 (define-key global-map 'kp-4 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
615 (define-key global-map 'kp-5 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
616 (define-key global-map 'kp-6 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
617 (define-key global-map 'kp-7 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
618 (define-key global-map 'kp-8 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
619 (define-key global-map 'kp-9 'self-insert-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
620
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
621 (define-key global-map 'select 'function-key-error)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
622 (define-key global-map 'print 'function-key-error)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
623 (define-key global-map 'execute 'execute-extended-command)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
624 (define-key global-map 'clearline 'function-key-error)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
625 (define-key global-map 'insertline 'open-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
626 (define-key global-map 'deleteline 'kill-line)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
627 (define-key global-map 'insertchar 'function-key-error)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
628 (define-key global-map 'deletechar 'delete-char)
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
629
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents:
diff changeset
630 ;;; keydefs.el ends here