Commit | Line | Data |
---|---|---|
4d120e8c RS |
1 | ;;; bindings.el --- define standard key bindings and some variables. |
2 | ||
9d4850e5 | 3 | ;; Copyright (C) 1985,86,87,92,93,94,95,96,99,2000, 2001 |
9ff33afb | 4 | ;; Free Software Foundation, Inc. |
4d120e8c RS |
5 | |
6 | ;; Maintainer: FSF | |
7 | ;; Keywords: internal | |
8 | ||
9 | ;; This file is part of GNU Emacs. | |
10 | ||
11 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 | ;; it under the terms of the GNU General Public License as published by | |
13 | ;; the Free Software Foundation; either version 2, or (at your option) | |
14 | ;; any later version. | |
15 | ||
16 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;; GNU General Public License for more details. | |
20 | ||
21 | ;; You should have received a copy of the GNU General Public License | |
22 | ;; along with GNU Emacs; see the file COPYING. If not, write to | |
23 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
24 | ;; Boston, MA 02111-1307, USA. | |
25 | ||
26 | ;;; Commentary: | |
27 | ||
28 | ;;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
29 | ;;; Special formatting conventions are used in this file! | |
30 | ;;; | |
31 | ;;; a backslash-newline is used at the beginning of a documentation string | |
32 | ;;; when that string should be stored in the file etc/DOCnnn, not in core. | |
33 | ;;; | |
34 | ;;; Such strings read into Lisp as numbers (during the pure-loading phase). | |
35 | ;;; | |
36 | ;;; But you must obey certain rules to make sure the string is understood | |
688953b5 | 37 | ;;; and goes into etc/DOCnnn properly. |
4d120e8c RS |
38 | ;;; |
39 | ;;; The doc string must appear in the standard place in a call to | |
40 | ;;; defun, autoload, defvar or defconst. No Lisp macros are recognized. | |
41 | ;;; The open-paren starting the definition must appear in column 0. | |
42 | ;;; | |
43 | ;;; In defvar and defconst, there is an additional rule: | |
44 | ;;; The double-quote that starts the string must be on the same | |
45 | ;;; line as the defvar or defconst. | |
46 | ;;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
47 | ||
48 | ;;; Code: | |
49 | ||
dfdabcf9 DL |
50 | (defun make-mode-line-mouse2-map (f) "\ |
51 | Return a keymap with single entry for mouse-2 on mode line. | |
52 | This is defined to run function F with no args in the buffer | |
53 | corresponding to the mode line clicked." | |
54 | (let ((map (make-sparse-keymap))) | |
e9580d71 | 55 | (define-key map [mode-line mouse-2] f) |
dfdabcf9 DL |
56 | map)) |
57 | ||
e9580d71 GM |
58 | |
59 | (defun mode-line-toggle-read-only (event) | |
60 | "Like `toggle-read-only', for the mode-line." | |
61 | (interactive "e") | |
62 | (save-selected-window | |
63 | (select-window (posn-window (event-start event))) | |
64 | (toggle-read-only) | |
65 | (force-mode-line-update))) | |
66 | ||
67 | ||
68 | (defun mode-line-toggle-modified (event) | |
69 | "Toggle the buffer-modified flag from the mode-line." | |
24127af0 | 70 | (interactive "e") |
e9580d71 GM |
71 | (save-selected-window |
72 | (select-window (posn-window (event-start event))) | |
73 | (set-buffer-modified-p (not (buffer-modified-p))) | |
74 | (force-mode-line-update))) | |
75 | ||
76 | ||
77 | (defun mode-line-widen (event) | |
78 | "Widen a buffer from the mode-line." | |
24127af0 | 79 | (interactive "e") |
e9580d71 GM |
80 | (save-selected-window |
81 | (select-window (posn-window (event-start event))) | |
82 | (widen) | |
83 | (force-mode-line-update))) | |
84 | ||
85 | ||
86 | (defun mode-line-abbrev-mode (event) | |
87 | "Turn off `abbrev-mode' from the mode-line." | |
24127af0 | 88 | (interactive "e") |
e9580d71 GM |
89 | (save-selected-window |
90 | (select-window (posn-window (event-start event))) | |
91 | (abbrev-mode) | |
92 | (force-mode-line-update))) | |
93 | ||
94 | ||
95 | (defun mode-line-auto-fill-mode (event) | |
96 | "Turn off `auto-fill-mode' from the mode-line." | |
24127af0 | 97 | (interactive "e") |
e9580d71 GM |
98 | (save-selected-window |
99 | (select-window (posn-window (event-start event))) | |
100 | (auto-fill-mode) | |
101 | (force-mode-line-update))) | |
102 | ||
103 | ||
5e1cddda DL |
104 | (defvar mode-line-input-method-map |
105 | (let ((map (make-sparse-keymap))) | |
106 | (define-key map [mode-line mouse-2] | |
107 | (lambda (e) | |
108 | (interactive "e") | |
109 | (save-selected-window | |
110 | (select-window | |
111 | (posn-window (event-start e))) | |
112 | (toggle-input-method) | |
113 | (force-mode-line-update)))) | |
114 | (define-key map [mode-line mouse-3] | |
115 | (lambda (e) | |
116 | (interactive "e") | |
117 | (save-selected-window | |
118 | (select-window | |
119 | (posn-window (event-start e))) | |
120 | (describe-current-input-method)))) | |
121 | (purecopy map))) | |
122 | ||
dfdabcf9 DL |
123 | (defvar mode-line-mule-info |
124 | `("" | |
9ff33afb | 125 | (current-input-method |
5e1cddda | 126 | (:eval |
3beb81fc DL |
127 | ,(purecopy |
128 | '(propertize current-input-method-title | |
129 | 'help-echo (concat | |
130 | "Input method: " | |
131 | current-input-method | |
132 | ". mouse-2 disables, mouse-3 describes") | |
133 | 'local-map mode-line-input-method-map)))) | |
134 | ,(propertize | |
135 | "%Z" | |
136 | 'help-echo | |
137 | (purecopy (lambda (window object point) | |
138 | (save-window-excursion | |
139 | (select-window window) | |
a9b511e0 EZ |
140 | ;; Don't show this tip if the coding system is nil, |
141 | ;; it reads like a bug, and is not useful anyway. | |
142 | (when buffer-file-coding-system | |
143 | (if enable-multibyte-characters | |
144 | (concat (symbol-name buffer-file-coding-system) | |
145 | " buffer; see M-x describe-coding-system") | |
146 | (concat "Unibyte " | |
147 | (symbol-name buffer-file-coding-system) | |
148 | " buffer")))))))) | |
44c034c1 KH |
149 | "Mode-line control for displaying information of multilingual environment. |
150 | Normally it displays current input method (if any activated) and | |
151 | mnemonics of the following coding systems: | |
152 | coding system for saving or writing the current buffer | |
153 | coding system for keyboard input (if Emacs is running on terminal) | |
ebc6753f DL |
154 | coding system for terminal output (if Emacs is running on terminal)" |
155 | ;; Currently not: | |
156 | ;;; coding system for decoding output of buffer process (if any) | |
157 | ;;; coding system for encoding text to send to buffer process (if any)." | |
158 | ) | |
f8bce5df KH |
159 | |
160 | (make-variable-buffer-local 'mode-line-mule-info) | |
161 | ||
688953b5 DL |
162 | (defvar mode-line-buffer-identification (purecopy '("%12b")) "\ |
163 | Mode-line control for identifying the buffer being displayed. | |
4544e9db | 164 | Its default value is (\"%12b\"). |
4d120e8c RS |
165 | Major modes that edit things other than ordinary files may change this |
166 | \(e.g. Info, Dired,...)") | |
167 | ||
168 | (make-variable-buffer-local 'mode-line-buffer-identification) | |
169 | ||
4544e9db RS |
170 | (defvar mode-line-frame-identification '("-%F ")) |
171 | ||
688953b5 DL |
172 | (defvar mode-line-process nil "\ |
173 | Mode-line control for displaying info on process status. | |
4d120e8c RS |
174 | Normally nil in most modes, since there is no process to display.") |
175 | ||
176 | (make-variable-buffer-local 'mode-line-process) | |
177 | ||
dfdabcf9 DL |
178 | (defvar mode-line-modified |
179 | (list (propertize | |
3beb81fc DL |
180 | "%1*" |
181 | 'help-echo (purecopy (lambda (window object point) | |
182 | (format "%sead-only: mouse-2 toggles" | |
183 | (save-selected-window | |
184 | (select-window window) | |
185 | (if buffer-read-only | |
186 | "R" | |
187 | "Not r"))))) | |
e9580d71 | 188 | 'local-map (purecopy (make-mode-line-mouse2-map |
24127af0 | 189 | #'mode-line-toggle-read-only))) |
3beb81fc DL |
190 | (propertize |
191 | "%1+" | |
192 | 'help-echo (purecopy (lambda (window object point) | |
9f9a5e7a | 193 | (format "%sodified: mouse-2 toggles" |
3beb81fc DL |
194 | (save-selected-window |
195 | (select-window window) | |
196 | (if (buffer-modified-p) | |
197 | "M" | |
198 | "Not m"))))) | |
199 | 'local-map (purecopy (make-mode-line-mouse2-map | |
e9580d71 | 200 | #'mode-line-toggle-modified)))) |
4d120e8c RS |
201 | "Mode-line control for displaying whether current buffer is modified.") |
202 | ||
203 | (make-variable-buffer-local 'mode-line-modified) | |
204 | ||
205 | (setq-default mode-line-format | |
2b4b2add DL |
206 | (let* ((help-echo |
207 | ;; The multi-line message doesn't work terribly well on the | |
208 | ;; bottom mode line... Better ideas? | |
209 | ;;; "\ | |
210 | ;;; mouse-1: select window, mouse-2: delete others, mouse-3: delete, | |
211 | ;;; drag-mouse-1: resize, C-mouse-2: split horizontally" | |
212 | "mouse-1: select window, mouse-2: delete others, mouse-3: delete ...") | |
213 | (dashes (propertize "--" 'help-echo help-echo))) | |
214 | (list | |
215 | (propertize "-" 'help-echo help-echo) | |
216 | 'mode-line-mule-info | |
217 | 'mode-line-modified | |
218 | 'mode-line-frame-identification | |
219 | 'mode-line-buffer-identification | |
220 | (propertize " " 'help-echo help-echo) | |
221 | 'global-mode-string | |
222 | (propertize " %[(" 'help-echo help-echo) | |
223 | '(:eval (mode-line-mode-name)) 'mode-line-process 'minor-mode-alist | |
224 | (propertize "%n" 'help-echo "mouse-2: widen" | |
e9580d71 | 225 | 'local-map (make-mode-line-mouse2-map #'mode-line-widen)) |
2b4b2add DL |
226 | (propertize ")%]--" 'help-echo help-echo) |
227 | `(which-func-mode ("" which-func-format ,dashes)) | |
228 | `(line-number-mode ("L%l" ,dashes)) | |
229 | `(column-number-mode ("C%c" ,dashes)) | |
230 | (purecopy '(-3 . "%p")) | |
231 | (propertize "-%-" 'help-echo help-echo)))) | |
4d120e8c RS |
232 | |
233 | (defvar minor-mode-alist nil "\ | |
234 | Alist saying how to show minor modes in the mode line. | |
235 | Each element looks like (VARIABLE STRING); | |
236 | STRING is included in the mode line iff VARIABLE's value is non-nil. | |
237 | ||
238 | Actually, STRING need not be a string; any possible mode-line element | |
239 | is okay. See `mode-line-format'.") | |
2fa58881 | 240 | ;; Don't use purecopy here--some people want to change these strings. |
dfdabcf9 DL |
241 | (setq minor-mode-alist |
242 | (list | |
243 | (list 'abbrev-mode | |
244 | (propertize " Abbrev" | |
245 | 'help-echo (purecopy | |
246 | "mouse-2: turn off Abbrev mode") | |
247 | 'local-map (purecopy (make-mode-line-mouse2-map | |
e9580d71 | 248 | #'mode-line-abbrev-mode)))) |
dfdabcf9 DL |
249 | '(overwrite-mode overwrite-mode) |
250 | (list 'auto-fill-function | |
251 | (propertize " Fill" | |
252 | 'help-echo (purecopy | |
253 | "mouse-2: turn off Autofill mode") | |
254 | 'local-map (purecopy (make-mode-line-mouse2-map | |
e9580d71 | 255 | #'mode-line-auto-fill-mode)))) |
dfdabcf9 DL |
256 | ;; not really a minor mode... |
257 | '(defining-kbd-macro " Def"))) | |
4d120e8c | 258 | |
688953b5 DL |
259 | (defvar mode-line-buffer-identification-keymap nil "\ |
260 | Keymap for what is displayed by `mode-line-buffer-identification'.") | |
b1dcba7b | 261 | |
688953b5 DL |
262 | (defvar mode-line-minor-mode-keymap nil "\ |
263 | Keymap for what is displayed by `mode-line-mode-name'.") | |
b1dcba7b | 264 | |
688953b5 DL |
265 | (defvar mode-line-mode-menu-keymap nil "\ |
266 | Keymap for mode operations menu in the mode line.") | |
b1dcba7b | 267 | |
688953b5 DL |
268 | (defun mode-line-unbury-buffer () "\ |
269 | Switch to the last buffer in the buffer list that is not hidden." | |
b1dcba7b GM |
270 | (interactive) |
271 | (let ((list (reverse (buffer-list)))) | |
4ac44b4c | 272 | (while (eq (aref (buffer-name (car list)) 0) ? ) |
b1dcba7b GM |
273 | (setq list (cdr list))) |
274 | (switch-to-buffer (car list)))) | |
275 | ||
688953b5 DL |
276 | (defun mode-line-other-buffer () "\ |
277 | Switch to the most recently selected buffer other than the current one." | |
b1dcba7b GM |
278 | (interactive) |
279 | (switch-to-buffer (other-buffer))) | |
280 | ||
5e1cddda DL |
281 | (defvar mode-line-mode-menu (make-sparse-keymap "Minor Modes") "\ |
282 | Menu of mode operations in the mode line.") | |
283 | ||
b1dcba7b GM |
284 | (defun mode-line-mode-menu-1 (event) |
285 | (interactive "e") | |
286 | (save-selected-window | |
287 | (select-window (posn-window (event-start event))) | |
288 | (let* ((selection (mode-line-mode-menu event)) | |
289 | (binding (and selection (lookup-key mode-line-mode-menu | |
290 | (vector (car selection)))))) | |
291 | (if binding | |
292 | (call-interactively binding))))) | |
293 | ||
688953b5 DL |
294 | (defun mode-line-mode-name () "\ |
295 | Return a string to display in the mode line for the current mode name." | |
b1dcba7b | 296 | (let (length (result mode-name)) |
5e1cddda DL |
297 | (let ((local-map (get-text-property 0 'local-map result)) |
298 | (help-echo (get-text-property 0 'help-echo result))) | |
299 | (setq result (copy-sequence result)) | |
300 | ;; Add `local-map' property if there isn't already one. | |
301 | (when (and (null local-map) | |
302 | (null (next-single-property-change 0 'local-map result))) | |
303 | (put-text-property 0 (length result) | |
304 | 'local-map mode-line-minor-mode-keymap result)) | |
305 | ;; Add `help-echo' property if there isn't already one. | |
306 | (when (and (null help-echo) | |
307 | (null (next-single-property-change 0 'help-echo result))) | |
308 | (put-text-property 0 (length result) | |
309 | 'help-echo "mouse-3: minor mode menu" result))) | |
b1dcba7b GM |
310 | result)) |
311 | ||
842d2ee9 DL |
312 | (defmacro bound-and-true-p (var) |
313 | "Return the value of symbol VAR if it is bound, else nil." | |
ff69e012 | 314 | `(and (boundp (quote ,var)) ,var)) |
842d2ee9 | 315 | |
dfdabcf9 DL |
316 | (define-key mode-line-mode-menu [overwrite-mode] |
317 | `(menu-item ,(purecopy "Overwrite") overwrite-mode | |
318 | :button (:toggle . overwrite-mode))) | |
2a5405b6 GM |
319 | (define-key mode-line-mode-menu [outline-minor-mode] |
320 | `(menu-item ,(purecopy "Outline") outline-minor-mode | |
321 | :button (:toggle . (bound-and-true-p outline-minor-mode)))) | |
322 | (define-key mode-line-mode-menu [line-number-mode] | |
323 | `(menu-item ,(purecopy "Line number") line-number-mode | |
324 | :button (:toggle . line-number-mode))) | |
325 | (define-key mode-line-mode-menu [highlight-changes-mode] | |
326 | `(menu-item ,(purecopy "Highlight changes") highlight-changes-mode | |
327 | :button (:toggle . highlight-changes-mode))) | |
7f8661a0 GM |
328 | (define-key mode-line-mode-menu [glasses-mode] |
329 | `(menu-item ,(purecopy "Glasses") glasses-mode | |
e84c695d | 330 | :button (:toggle . (bound-and-true-p glasses-mode)))) |
2a5405b6 GM |
331 | (define-key mode-line-mode-menu [hide-ifdef-mode] |
332 | `(menu-item ,(purecopy "Hide ifdef") hide-ifdef-mode | |
333 | :button (:toggle . (bound-and-true-p hide-ifdef-mode)))) | |
334 | (define-key mode-line-mode-menu [font-lock-mode] | |
335 | `(menu-item ,(purecopy "Font-lock") font-lock-mode | |
336 | :button (:toggle . font-lock-mode))) | |
337 | (define-key mode-line-mode-menu [flyspell-mode] | |
338 | `(menu-item ,(purecopy "Flyspell") flyspell-mode | |
339 | :button (:toggle . (bound-and-true-p flyspell-mode)))) | |
340 | (define-key mode-line-mode-menu [column-number-mode] | |
341 | `(menu-item ,(purecopy "Column number") column-number-mode | |
342 | :button (:toggle . column-number-mode))) | |
343 | (define-key mode-line-mode-menu [auto-fill-mode] | |
344 | `(menu-item ,(purecopy "Auto-fill") auto-fill-mode | |
345 | :button (:toggle . auto-fill-function))) | |
346 | (define-key mode-line-mode-menu [auto-revert-mode] | |
347 | `(menu-item ,(purecopy "Auto revert") auto-revert-mode | |
348 | :button (:toggle . auto-revert-mode))) | |
349 | (define-key mode-line-mode-menu [abbrev-mode] | |
350 | `(menu-item ,(purecopy "Abbrev") abbrev-mode | |
351 | :button (:toggle . abbrev-mode))) | |
dfdabcf9 | 352 | |
5e1cddda DL |
353 | (defun mode-line-mode-menu (event) |
354 | (interactive "@e") | |
355 | (x-popup-menu event mode-line-mode-menu)) | |
356 | ||
357 | ;; Add menu of buffer operations to the buffer identification part | |
358 | ;; of the mode line. | |
359 | (let ((map (make-sparse-keymap))) | |
360 | (define-key map [mode-line mouse-1] 'mode-line-other-buffer) | |
361 | (define-key map [header-line mouse-1] 'mode-line-other-buffer) | |
362 | (define-key map [mode-line M-mouse-2] 'mode-line-unbury-buffer) | |
363 | (define-key map [header-line M-mouse-2] 'mode-line-unbury-buffer) | |
364 | (define-key map [mode-line mouse-2] 'bury-buffer) | |
365 | (define-key map [header-line mouse-2] 'bury-buffer) | |
366 | (define-key map [mode-line down-mouse-3] 'mouse-buffer-menu) | |
367 | (define-key map [header-line down-mouse-3] 'mouse-buffer-menu) | |
ec9db7a7 GM |
368 | (setq mode-line-buffer-identification-keymap map)) |
369 | ||
370 | (defun propertized-buffer-identification (fmt) | |
371 | "Return a list suitable for `mode-line-buffer-identification'. | |
372 | FMT is a format specifier such as \"%12b\". This function adds | |
373 | text properties for face, help-echo, and local-map to it." | |
374 | (list (propertize fmt | |
375 | 'face '(:weight bold) | |
376 | 'help-echo (purecopy "mouse-1: other \ | |
5e1cddda | 377 | buffer, mouse-2: prev, M-mouse-2: next, mouse-3: buffer menu") |
ec9db7a7 GM |
378 | 'local-map mode-line-buffer-identification-keymap))) |
379 | ||
380 | (setq-default mode-line-buffer-identification | |
381 | (propertized-buffer-identification "%12b")) | |
5e1cddda DL |
382 | |
383 | ;; Menu of minor modes. | |
384 | (let ((map (make-sparse-keymap))) | |
385 | (define-key map [mode-line down-mouse-3] 'mode-line-mode-menu-1) | |
386 | (define-key map [header-line down-mouse-3] 'mode-line-mode-menu-1) | |
387 | (setq mode-line-minor-mode-keymap map)) | |
b1dcba7b | 388 | |
4d120e8c RS |
389 | ;; These variables are used by autoloadable packages. |
390 | ;; They are defined here so that they do not get overridden | |
391 | ;; by the loading of those packages. | |
392 | ||
393 | ;; Names in directory that end in one of these | |
394 | ;; are ignored in completion, | |
395 | ;; making it more likely you will get a unique match. | |
396 | (setq completion-ignored-extensions | |
d34c1b05 RS |
397 | (append |
398 | (cond ((or (eq system-type 'ms-dos) (eq system-type 'windows-nt)) | |
399 | '(".o" "~" ".bin" ".bak" ".obj" ".map" | |
400 | ".a" ".ln" ".blg" ".bbl")) | |
401 | ((eq system-type 'vax-vms) | |
402 | '(".obj" ".exe" ".bin" ".lbin" ".sbin" | |
403 | ".brn" ".rnt" ".mem" ".lni" ".lis" | |
404 | ".olb" ".tlb" ".mlb" ".hlb")) | |
405 | (t | |
ff69e012 | 406 | '(".o" "~" ".bin" ".lbin" ".fasl" ".ufsl" |
d34c1b05 RS |
407 | ".a" ".ln" ".blg" ".bbl"))) |
408 | '(".elc" ".lof" | |
409 | ".glo" ".idx" ".lot" | |
410 | ;; TeX-related | |
71a92751 | 411 | ".dvi" ".fmt" ".tfm" ".pdf" |
c79e04d8 RS |
412 | ;; Java compiled |
413 | ".class" | |
414 | ;; Clisp | |
415 | ".fas" ".lib" | |
416 | ;; CMUCL | |
ff69e012 | 417 | ".x86f" ".sparcf" |
f7e1a28d GM |
418 | ;; Libtool |
419 | ".lo" ".la" | |
d34c1b05 RS |
420 | ;; Texinfo-related |
421 | ".toc" ".log" ".aux" | |
422 | ".cp" ".fn" ".ky" ".pg" ".tp" ".vr" | |
423 | ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs"))) | |
4d120e8c | 424 | |
2b4b2add DL |
425 | ;; Packages should add to this list appropriately when they are |
426 | ;; loaded, rather than listing everything here. | |
4d120e8c RS |
427 | (setq debug-ignored-errors |
428 | '(beginning-of-line beginning-of-buffer end-of-line | |
429 | end-of-buffer end-of-file buffer-read-only | |
c79e04d8 | 430 | file-supersession |
4d120e8c RS |
431 | "^Previous command was not a yank$" |
432 | "^Minibuffer window is not active$" | |
433 | "^End of history; no next item$" | |
434 | "^Beginning of history; no preceding item$" | |
435 | "^No recursive edit is in progress$" | |
436 | "^Changes to be undone are outside visible portion of buffer$" | |
437 | "^No undo information in this buffer$" | |
438 | "^No further undo information$" | |
439 | "^Save not confirmed$" | |
440 | "^Recover-file cancelled\\.$" | |
800c9512 | 441 | "^Cannot switch buffers in a dedicated window$" |
cdd4703c RS |
442 | |
443 | ;; ediff | |
444 | "^Errors in diff output. Diff output is in " | |
445 | "^Hmm... I don't see an Ediff command around here...$" | |
446 | "^Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer$" | |
447 | ": This command runs in Ediff Control Buffer only!$" | |
448 | ": Invalid op in ediff-check-version$" | |
449 | "^ediff-shrink-window-C can be used only for merging jobs$" | |
450 | "^Lost difference info on these directories$" | |
451 | "^This command is inapplicable in the present context$" | |
452 | "^This session group has no parent$" | |
453 | "^Can't hide active session, $" | |
cdd4703c RS |
454 | "^Ediff: something wrong--no multiple diffs buffer$" |
455 | "^Can't make context diff for Session $" | |
456 | "^The patch buffer wasn't found$" | |
457 | "^Aborted$" | |
458 | "^This Ediff session is not part of a session group$" | |
459 | "^No active Ediff sessions or corrupted session registry$" | |
460 | "^No session info in this line$" | |
461 | "^`.*' is not an ordinary file$" | |
462 | "^Patch appears to have failed$" | |
463 | "^Recomputation of differences cancelled$" | |
464 | "^No fine differences in this mode$" | |
465 | "^Lost connection to ancestor buffer...sorry$" | |
466 | "^Not merging with ancestor$" | |
467 | "^Don't know how to toggle read-only in buffer " | |
468 | "Emacs is not running as a window application$" | |
469 | "^This command makes sense only when merging with an ancestor$" | |
470 | "^At end of the difference list$" | |
471 | "^At beginning of the difference list$" | |
cdd4703c RS |
472 | "^Nothing saved for diff .* in buffer " |
473 | "^Buffer is out of sync for file " | |
474 | "^Buffer out of sync for file " | |
475 | "^Output from `diff' not found$" | |
476 | "^You forgot to specify a region in buffer " | |
477 | "^All right. Make up your mind and come back...$" | |
478 | "^Current buffer is not visiting any file$" | |
479 | "^Failed to retrieve revision: $" | |
480 | "^Can't determine display width.$" | |
481 | "^File `.*' does not exist or is not readable$" | |
482 | "^File `.*' is a directory$" | |
483 | "^Buffer .* doesn't exist$" | |
484 | "^Directories . and . are the same: " | |
485 | "^Directory merge aborted$" | |
486 | "^Merge of directory revisions aborted$" | |
487 | "^Buffer .* doesn't exist$" | |
488 | "^There is no file to merge$" | |
d8d0fa6c | 489 | "^Version control package .*.el not found. Use vc.el instead$")) |
4d120e8c RS |
490 | |
491 | ||
492 | (make-variable-buffer-local 'indent-tabs-mode) | |
493 | ||
152d064d | 494 | ;; We have base64 and md5 functions built in now. |
acafa9cf | 495 | (add-to-list 'features 'base64) |
152d064d GM |
496 | (add-to-list 'features 'md5) |
497 | (add-to-list 'features 'overlay) | |
acafa9cf | 498 | |
0094907b RS |
499 | (define-key esc-map "\t" 'complete-symbol) |
500 | ||
688953b5 DL |
501 | (defun complete-symbol (arg) "\ |
502 | Perform tags completion on the text around point. | |
4d120e8c RS |
503 | Completes to the set of names listed in the current tags table. |
504 | The string to complete is chosen in the same way as the default | |
364581dc RS |
505 | for \\[find-tag] (which see). |
506 | ||
507 | With a prefix argument, this command does completion within | |
508 | the collection of symbols listed in the index of the manual for the | |
509 | language you are using." | |
0094907b RS |
510 | (interactive "P") |
511 | (if arg | |
364581dc RS |
512 | (info-complete-symbol) |
513 | (if (fboundp 'complete-tag) | |
514 | (complete-tag) | |
515 | ;; Don't autoload etags if we have no tags table. | |
516 | (error (substitute-command-keys | |
517 | "No tags table loaded; use \\[visit-tags-table] to load one"))))) | |
4d120e8c RS |
518 | |
519 | ;; Reduce total amount of space we must allocate during this function | |
520 | ;; that we will not need to keep permanently. | |
521 | (garbage-collect) | |
522 | \f | |
d92921c3 KH |
523 | ;; Make all multibyte characters self-insert. |
524 | (let ((l (generic-character-list)) | |
525 | (table (nth 1 global-map))) | |
526 | (while l | |
527 | (set-char-table-default table (car l) 'self-insert-command) | |
528 | (setq l (cdr l)))) | |
3607b64d | 529 | |
4d120e8c RS |
530 | (setq help-event-list '(help f1)) |
531 | ||
97710114 RS |
532 | (make-variable-buffer-local 'minor-mode-overriding-map-alist) |
533 | ||
4d120e8c RS |
534 | ;These commands are defined in editfns.c |
535 | ;but they are not assigned to keys there. | |
536 | (put 'narrow-to-region 'disabled t) | |
537 | (define-key ctl-x-map "nn" 'narrow-to-region) | |
538 | (define-key ctl-x-map "nw" 'widen) | |
539 | ;; (define-key ctl-x-map "n" 'narrow-to-region) | |
540 | ;; (define-key ctl-x-map "w" 'widen) | |
541 | ||
542 | (define-key global-map "\C-j" 'newline-and-indent) | |
543 | (define-key global-map "\C-m" 'newline) | |
544 | (define-key global-map "\C-o" 'open-line) | |
545 | (define-key esc-map "\C-o" 'split-line) | |
546 | (define-key global-map "\C-q" 'quoted-insert) | |
547 | (define-key esc-map "^" 'delete-indentation) | |
548 | (define-key esc-map "\\" 'delete-horizontal-space) | |
549 | (define-key esc-map "m" 'back-to-indentation) | |
550 | (define-key ctl-x-map "\C-o" 'delete-blank-lines) | |
551 | (define-key esc-map " " 'just-one-space) | |
552 | (define-key esc-map "z" 'zap-to-char) | |
553 | (define-key esc-map "=" 'count-lines-region) | |
554 | (define-key ctl-x-map "=" 'what-cursor-position) | |
555 | (define-key esc-map ":" 'eval-expression) | |
556 | ;; Define ESC ESC : like ESC : for people who type ESC ESC out of habit. | |
557 | (define-key esc-map "\M-:" 'eval-expression) | |
558 | ;; Changed from C-x ESC so that function keys work following C-x. | |
559 | (define-key ctl-x-map "\e\e" 'repeat-complex-command) | |
560 | ;; New binding analogous to M-:. | |
561 | (define-key ctl-x-map "\M-:" 'repeat-complex-command) | |
562 | (define-key ctl-x-map "u" 'advertised-undo) | |
563 | ;; Many people are used to typing C-/ on X terminals and getting C-_. | |
564 | (define-key global-map [?\C-/] 'undo) | |
565 | (define-key global-map "\C-_" 'undo) | |
566 | (define-key esc-map "!" 'shell-command) | |
567 | (define-key esc-map "|" 'shell-command-on-region) | |
568 | ||
569 | ;; This is an experiment--make up and down arrows do history. | |
570 | (define-key minibuffer-local-map [up] 'previous-history-element) | |
571 | (define-key minibuffer-local-map [down] 'next-history-element) | |
572 | (define-key minibuffer-local-ns-map [up] 'previous-history-element) | |
573 | (define-key minibuffer-local-ns-map [down] 'next-history-element) | |
574 | (define-key minibuffer-local-completion-map [up] 'previous-history-element) | |
575 | (define-key minibuffer-local-completion-map [down] 'next-history-element) | |
576 | (define-key minibuffer-local-must-match-map [up] 'previous-history-element) | |
577 | (define-key minibuffer-local-must-match-map [down] 'next-history-element) | |
578 | ||
579 | (define-key global-map "\C-u" 'universal-argument) | |
580 | (let ((i ?0)) | |
581 | (while (<= i ?9) | |
582 | (define-key esc-map (char-to-string i) 'digit-argument) | |
583 | (setq i (1+ i)))) | |
584 | (define-key esc-map "-" 'negative-argument) | |
585 | ;; Define control-digits. | |
586 | (let ((i ?0)) | |
587 | (while (<= i ?9) | |
588 | (define-key global-map (read (format "[?\\C-%c]" i)) 'digit-argument) | |
589 | (setq i (1+ i)))) | |
590 | (define-key global-map [?\C--] 'negative-argument) | |
591 | ;; Define control-meta-digits. | |
592 | (let ((i ?0)) | |
593 | (while (<= i ?9) | |
594 | (define-key esc-map (read (format "[?\\C-%c]" i)) 'digit-argument) | |
595 | (setq i (1+ i)))) | |
596 | (define-key global-map [?\C-\M--] 'negative-argument) | |
597 | ||
598 | (define-key global-map "\C-k" 'kill-line) | |
599 | (define-key global-map "\C-w" 'kill-region) | |
600 | (define-key esc-map "w" 'kill-ring-save) | |
601 | (define-key esc-map "\C-w" 'append-next-kill) | |
602 | (define-key global-map "\C-y" 'yank) | |
603 | (define-key esc-map "y" 'yank-pop) | |
604 | ||
605 | ;; (define-key ctl-x-map "a" 'append-to-buffer) | |
606 | ||
607 | (define-key global-map "\C-@" 'set-mark-command) | |
608 | ;; Many people are used to typing C-SPC and getting C-@. | |
e68e61b5 | 609 | (define-key global-map [?\C- ] 'set-mark-command) |
4d120e8c RS |
610 | (define-key ctl-x-map "\C-x" 'exchange-point-and-mark) |
611 | (define-key ctl-x-map "\C-@" 'pop-global-mark) | |
e68e61b5 | 612 | (define-key ctl-x-map [?\C- ] 'pop-global-mark) |
4d120e8c RS |
613 | |
614 | (define-key global-map "\C-n" 'next-line) | |
615 | (define-key global-map "\C-p" 'previous-line) | |
616 | (define-key ctl-x-map "\C-n" 'set-goal-column) | |
617 | ||
618 | ;;(defun function-key-error () | |
619 | ;; (interactive) | |
620 | ;; (error "That function key is not bound to anything.")) | |
621 | ||
622 | (define-key global-map [menu] 'execute-extended-command) | |
623 | (define-key global-map [find] 'search-forward) | |
624 | ||
9d4850e5 GM |
625 | ;; Don't do this. We define <delete> in function-key-map instead. |
626 | ;(define-key global-map [delete] 'backward-delete-char) | |
4e4f9651 | 627 | |
4d120e8c | 628 | ;; natural bindings for terminal keycaps --- defined in X keysym order |
1dfca644 GM |
629 | (define-key global-map [home] 'beginning-of-line) |
630 | (define-key global-map [C-home] 'beginning-of-buffer) | |
4d120e8c RS |
631 | (define-key global-map [M-home] 'beginning-of-buffer-other-window) |
632 | (define-key global-map [left] 'backward-char) | |
633 | (define-key global-map [up] 'previous-line) | |
634 | (define-key global-map [right] 'forward-char) | |
635 | (define-key global-map [down] 'next-line) | |
636 | (define-key global-map [prior] 'scroll-down) | |
637 | (define-key global-map [next] 'scroll-up) | |
638 | (define-key global-map [C-up] 'backward-paragraph) | |
639 | (define-key global-map [C-down] 'forward-paragraph) | |
640 | (define-key global-map [C-prior] 'scroll-right) | |
641 | (define-key global-map [C-next] 'scroll-left) | |
642 | (define-key global-map [M-next] 'scroll-other-window) | |
643 | (define-key global-map [M-prior] 'scroll-other-window-down) | |
1dfca644 GM |
644 | (define-key global-map [end] 'end-of-line) |
645 | (define-key global-map [C-end] 'end-of-buffer) | |
4d120e8c RS |
646 | (define-key global-map [M-end] 'end-of-buffer-other-window) |
647 | (define-key global-map [begin] 'beginning-of-buffer) | |
648 | (define-key global-map [M-begin] 'beginning-of-buffer-other-window) | |
649 | ;; (define-key global-map [select] 'function-key-error) | |
650 | ;; (define-key global-map [print] 'function-key-error) | |
651 | (define-key global-map [execute] 'execute-extended-command) | |
652 | (define-key global-map [insert] 'overwrite-mode) | |
653 | (define-key global-map [C-insert] 'kill-ring-save) | |
654 | (define-key global-map [S-insert] 'yank) | |
655 | (define-key global-map [undo] 'undo) | |
656 | (define-key global-map [redo] 'repeat-complex-command) | |
657 | ;; (define-key global-map [clearline] 'function-key-error) | |
658 | (define-key global-map [insertline] 'open-line) | |
659 | (define-key global-map [deleteline] 'kill-line) | |
660 | ;; (define-key global-map [insertchar] 'function-key-error) | |
661 | (define-key global-map [deletechar] 'delete-char) | |
662 | ;; (define-key global-map [backtab] 'function-key-error) | |
663 | ;; (define-key global-map [f1] 'function-key-error) | |
664 | ;; (define-key global-map [f2] 'function-key-error) | |
665 | ;; (define-key global-map [f3] 'function-key-error) | |
666 | ;; (define-key global-map [f4] 'function-key-error) | |
667 | ;; (define-key global-map [f5] 'function-key-error) | |
668 | ;; (define-key global-map [f6] 'function-key-error) | |
669 | ;; (define-key global-map [f7] 'function-key-error) | |
670 | ;; (define-key global-map [f8] 'function-key-error) | |
671 | ;; (define-key global-map [f9] 'function-key-error) | |
672 | ;; (define-key global-map [f10] 'function-key-error) | |
673 | ;; (define-key global-map [f11] 'function-key-error) | |
674 | ;; (define-key global-map [f12] 'function-key-error) | |
675 | ;; (define-key global-map [f13] 'function-key-error) | |
676 | ;; (define-key global-map [f14] 'function-key-error) | |
677 | ;; (define-key global-map [f15] 'function-key-error) | |
678 | ;; (define-key global-map [f16] 'function-key-error) | |
679 | ;; (define-key global-map [f17] 'function-key-error) | |
680 | ;; (define-key global-map [f18] 'function-key-error) | |
681 | ;; (define-key global-map [f19] 'function-key-error) | |
682 | ;; (define-key global-map [f20] 'function-key-error) | |
683 | ;; (define-key global-map [f21] 'function-key-error) | |
684 | ;; (define-key global-map [f22] 'function-key-error) | |
685 | ;; (define-key global-map [f23] 'function-key-error) | |
686 | ;; (define-key global-map [f24] 'function-key-error) | |
687 | ;; (define-key global-map [f25] 'function-key-error) | |
688 | ;; (define-key global-map [f26] 'function-key-error) | |
689 | ;; (define-key global-map [f27] 'function-key-error) | |
690 | ;; (define-key global-map [f28] 'function-key-error) | |
691 | ;; (define-key global-map [f29] 'function-key-error) | |
692 | ;; (define-key global-map [f30] 'function-key-error) | |
693 | ;; (define-key global-map [f31] 'function-key-error) | |
694 | ;; (define-key global-map [f32] 'function-key-error) | |
695 | ;; (define-key global-map [f33] 'function-key-error) | |
696 | ;; (define-key global-map [f34] 'function-key-error) | |
697 | ;; (define-key global-map [f35] 'function-key-error) | |
698 | ;; (define-key global-map [kp-backtab] 'function-key-error) | |
699 | ;; (define-key global-map [kp-space] 'function-key-error) | |
700 | ;; (define-key global-map [kp-tab] 'function-key-error) | |
701 | ;; (define-key global-map [kp-enter] 'function-key-error) | |
702 | ;; (define-key global-map [kp-f1] 'function-key-error) | |
703 | ;; (define-key global-map [kp-f2] 'function-key-error) | |
704 | ;; (define-key global-map [kp-f3] 'function-key-error) | |
705 | ;; (define-key global-map [kp-f4] 'function-key-error) | |
706 | ;; (define-key global-map [kp-multiply] 'function-key-error) | |
707 | ;; (define-key global-map [kp-add] 'function-key-error) | |
708 | ;; (define-key global-map [kp-separator] 'function-key-error) | |
709 | ;; (define-key global-map [kp-subtract] 'function-key-error) | |
710 | ;; (define-key global-map [kp-decimal] 'function-key-error) | |
711 | ;; (define-key global-map [kp-divide] 'function-key-error) | |
712 | ;; (define-key global-map [kp-0] 'function-key-error) | |
713 | ;; (define-key global-map [kp-1] 'function-key-error) | |
714 | ;; (define-key global-map [kp-2] 'function-key-error) | |
715 | ;; (define-key global-map [kp-3] 'function-key-error) | |
716 | ;; (define-key global-map [kp-4] 'function-key-error) | |
717 | ;; (define-key global-map [kp-5] 'recenter) | |
718 | ;; (define-key global-map [kp-6] 'function-key-error) | |
719 | ;; (define-key global-map [kp-7] 'function-key-error) | |
720 | ;; (define-key global-map [kp-8] 'function-key-error) | |
721 | ;; (define-key global-map [kp-9] 'function-key-error) | |
722 | ;; (define-key global-map [kp-equal] 'function-key-error) | |
723 | ||
724 | ;; X11R6 distinguishes these keys from the non-kp keys. | |
725 | ;; Make them behave like the non-kp keys unless otherwise bound. | |
726 | (define-key function-key-map [kp-home] [home]) | |
727 | (define-key function-key-map [kp-left] [left]) | |
728 | (define-key function-key-map [kp-up] [up]) | |
729 | (define-key function-key-map [kp-right] [right]) | |
730 | (define-key function-key-map [kp-down] [down]) | |
731 | (define-key function-key-map [kp-prior] [prior]) | |
732 | (define-key function-key-map [kp-next] [next]) | |
733 | (define-key function-key-map [M-kp-next] [M-next]) | |
734 | (define-key function-key-map [kp-end] [end]) | |
735 | (define-key function-key-map [kp-begin] [begin]) | |
736 | (define-key function-key-map [kp-insert] [insert]) | |
9d4850e5 GM |
737 | (define-key function-key-map [backspace] [?\C-?]) |
738 | (define-key function-key-map [delete] [?\C-?]) | |
ee5cece0 | 739 | (define-key function-key-map [kp-delete] [?\C-?]) |
4d120e8c RS |
740 | |
741 | (define-key global-map [mouse-movement] 'ignore) | |
742 | ||
743 | (define-key global-map "\C-t" 'transpose-chars) | |
744 | (define-key esc-map "t" 'transpose-words) | |
745 | (define-key esc-map "\C-t" 'transpose-sexps) | |
746 | (define-key ctl-x-map "\C-t" 'transpose-lines) | |
747 | ||
5589b330 SM |
748 | (define-key esc-map ";" 'comment-dwim) |
749 | (define-key esc-map "j" 'comment-indent-new-line) | |
750 | (define-key esc-map "\C-j" 'comment-indent-new-line) | |
751 | (define-key ctl-x-map ";" 'comment-set-column) | |
4d120e8c RS |
752 | (define-key ctl-x-map "f" 'set-fill-column) |
753 | (define-key ctl-x-map "$" 'set-selective-display) | |
754 | ||
755 | (define-key esc-map "@" 'mark-word) | |
756 | (define-key esc-map "f" 'forward-word) | |
757 | (define-key esc-map "b" 'backward-word) | |
758 | (define-key esc-map "d" 'kill-word) | |
759 | (define-key esc-map "\177" 'backward-kill-word) | |
760 | ||
761 | (define-key esc-map "<" 'beginning-of-buffer) | |
762 | (define-key esc-map ">" 'end-of-buffer) | |
763 | (define-key ctl-x-map "h" 'mark-whole-buffer) | |
764 | (define-key esc-map "\\" 'delete-horizontal-space) | |
765 | ||
766 | (defalias 'mode-specific-command-prefix (make-sparse-keymap)) | |
4b189189 | 767 | (defvar mode-specific-map (symbol-function 'mode-specific-command-prefix) |
4d120e8c RS |
768 | "Keymap for characters following C-c.") |
769 | (define-key global-map "\C-c" 'mode-specific-command-prefix) | |
770 | ||
771 | (global-set-key [M-right] 'forward-word) | |
772 | (global-set-key [M-left] 'backward-word) | |
773 | ;; ilya@math.ohio-state.edu says these bindings are standard on PC editors. | |
774 | (global-set-key [C-right] 'forward-word) | |
775 | (global-set-key [C-left] 'backward-word) | |
776 | ;; This is not quite compatible, but at least is analogous | |
27940e1f GM |
777 | (global-set-key [C-delete] 'backward-kill-word) |
778 | (global-set-key [C-backspace] 'kill-word) | |
4d120e8c RS |
779 | ;; This is "move to the clipboard", or as close as we come. |
780 | (global-set-key [S-delete] 'kill-region) | |
781 | ||
782 | (define-key esc-map "\C-f" 'forward-sexp) | |
783 | (define-key esc-map "\C-b" 'backward-sexp) | |
784 | (define-key esc-map "\C-u" 'backward-up-list) | |
785 | (define-key esc-map "\C-@" 'mark-sexp) | |
786 | (define-key esc-map [?\C-\ ] 'mark-sexp) | |
787 | (define-key esc-map "\C-d" 'down-list) | |
788 | (define-key esc-map "\C-k" 'kill-sexp) | |
789 | (define-key global-map [C-M-delete] 'backward-kill-sexp) | |
790 | (define-key global-map [C-M-backspace] 'backward-kill-sexp) | |
da7ddbed GM |
791 | (define-key esc-map [C-delete] 'backward-kill-sexp) |
792 | (define-key esc-map [C-backspace] 'backward-kill-sexp) | |
4d120e8c RS |
793 | (define-key esc-map "\C-n" 'forward-list) |
794 | (define-key esc-map "\C-p" 'backward-list) | |
795 | (define-key esc-map "\C-a" 'beginning-of-defun) | |
796 | (define-key esc-map "\C-e" 'end-of-defun) | |
797 | (define-key esc-map "\C-h" 'mark-defun) | |
798 | (define-key ctl-x-map "nd" 'narrow-to-defun) | |
799 | (define-key esc-map "(" 'insert-parentheses) | |
800 | (define-key esc-map ")" 'move-past-close-and-reindent) | |
4d120e8c RS |
801 | |
802 | (define-key ctl-x-map "\C-e" 'eval-last-sexp) | |
6d64bc9f RS |
803 | |
804 | (define-key ctl-x-map "m" 'compose-mail) | |
805 | (define-key ctl-x-4-map "m" 'compose-mail-other-window) | |
806 | (define-key ctl-x-5-map "m" 'compose-mail-other-frame) | |
4d120e8c RS |
807 | \f |
808 | (define-key ctl-x-map "r\C-@" 'point-to-register) | |
809 | (define-key ctl-x-map [?r ?\C-\ ] 'point-to-register) | |
810 | (define-key ctl-x-map "r " 'point-to-register) | |
811 | (define-key ctl-x-map "rj" 'jump-to-register) | |
812 | (define-key ctl-x-map "rs" 'copy-to-register) | |
813 | (define-key ctl-x-map "rx" 'copy-to-register) | |
814 | (define-key ctl-x-map "ri" 'insert-register) | |
815 | (define-key ctl-x-map "rg" 'insert-register) | |
816 | (define-key ctl-x-map "rr" 'copy-rectangle-to-register) | |
bdb45de9 KH |
817 | (define-key ctl-x-map "rn" 'number-to-register) |
818 | (define-key ctl-x-map "r+" 'increment-register) | |
4d120e8c RS |
819 | (define-key ctl-x-map "rc" 'clear-rectangle) |
820 | (define-key ctl-x-map "rk" 'kill-rectangle) | |
821 | (define-key ctl-x-map "rd" 'delete-rectangle) | |
822 | (define-key ctl-x-map "ry" 'yank-rectangle) | |
823 | (define-key ctl-x-map "ro" 'open-rectangle) | |
824 | (define-key ctl-x-map "rt" 'string-rectangle) | |
825 | (define-key ctl-x-map "rw" 'window-configuration-to-register) | |
826 | (define-key ctl-x-map "rf" 'frame-configuration-to-register) | |
827 | ||
828 | ;; These key bindings are deprecated; use the above C-x r map instead. | |
829 | ;; We use these aliases so \[...] will show the C-x r bindings instead. | |
830 | (defalias 'point-to-register-compatibility-binding 'point-to-register) | |
831 | (defalias 'jump-to-register-compatibility-binding 'jump-to-register) | |
832 | (defalias 'copy-to-register-compatibility-binding 'copy-to-register) | |
833 | (defalias 'insert-register-compatibility-binding 'insert-register) | |
834 | (define-key ctl-x-map "/" 'point-to-register-compatibility-binding) | |
835 | (define-key ctl-x-map "j" 'jump-to-register-compatibility-binding) | |
836 | (define-key ctl-x-map "x" 'copy-to-register-compatibility-binding) | |
837 | (define-key ctl-x-map "g" 'insert-register-compatibility-binding) | |
838 | ;; (define-key ctl-x-map "r" 'copy-rectangle-to-register) | |
839 | ||
840 | (define-key esc-map "q" 'fill-paragraph) | |
841 | ;; (define-key esc-map "g" 'fill-region) | |
842 | (define-key ctl-x-map "." 'set-fill-prefix) | |
843 | \f | |
844 | (define-key esc-map "{" 'backward-paragraph) | |
845 | (define-key esc-map "}" 'forward-paragraph) | |
846 | (define-key esc-map "h" 'mark-paragraph) | |
847 | (define-key esc-map "a" 'backward-sentence) | |
848 | (define-key esc-map "e" 'forward-sentence) | |
849 | (define-key esc-map "k" 'kill-sentence) | |
850 | (define-key ctl-x-map "\177" 'backward-kill-sentence) | |
851 | ||
852 | (define-key ctl-x-map "[" 'backward-page) | |
853 | (define-key ctl-x-map "]" 'forward-page) | |
854 | (define-key ctl-x-map "\C-p" 'mark-page) | |
855 | (define-key ctl-x-map "l" 'count-lines-page) | |
856 | (define-key ctl-x-map "np" 'narrow-to-page) | |
857 | ;; (define-key ctl-x-map "p" 'narrow-to-page) | |
858 | \f | |
859 | (define-key ctl-x-map "al" 'add-mode-abbrev) | |
860 | (define-key ctl-x-map "a\C-a" 'add-mode-abbrev) | |
861 | (define-key ctl-x-map "ag" 'add-global-abbrev) | |
862 | (define-key ctl-x-map "a+" 'add-mode-abbrev) | |
863 | (define-key ctl-x-map "aig" 'inverse-add-global-abbrev) | |
864 | (define-key ctl-x-map "ail" 'inverse-add-mode-abbrev) | |
865 | ;; (define-key ctl-x-map "a\C-h" 'inverse-add-global-abbrev) | |
866 | (define-key ctl-x-map "a-" 'inverse-add-global-abbrev) | |
867 | (define-key ctl-x-map "ae" 'expand-abbrev) | |
868 | (define-key ctl-x-map "a'" 'expand-abbrev) | |
869 | ;; (define-key ctl-x-map "\C-a" 'add-mode-abbrev) | |
870 | ;; (define-key ctl-x-map "\+" 'add-global-abbrev) | |
871 | ;; (define-key ctl-x-map "\C-h" 'inverse-add-mode-abbrev) | |
872 | ;; (define-key ctl-x-map "\-" 'inverse-add-global-abbrev) | |
873 | (define-key esc-map "'" 'abbrev-prefix-mark) | |
874 | (define-key ctl-x-map "'" 'expand-abbrev) | |
875 | ||
aa5ba90e | 876 | (define-key ctl-x-map "z" 'repeat) |
e4ade21b | 877 | |
4d120e8c RS |
878 | ;;; Don't compile this file; it contains no large function definitions. |
879 | ;;; Don't look for autoload cookies in this file. | |
880 | ;;; Local Variables: | |
881 | ;;; no-byte-compile: t | |
882 | ;;; no-update-autoloads: t | |
883 | ;;; End: | |
884 | ||
885 | ;;; bindings.el ends here |