Commit | Line | Data |
---|---|---|
60370d40 | 1 | ;;; pc-mode.el --- emulate certain key bindings used on PCs |
b578f267 | 2 | |
ad837797 | 3 | ;; Copyright (C) 1995 Free Software Foundation, Inc. |
e0072c10 | 4 | |
070c251e | 5 | ;; Maintainer: FSF |
e0072c10 RS |
6 | ;; Keywords: emulations |
7 | ||
8 | ;; This file is part of GNU Emacs. | |
9 | ||
10 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 | ;; it under the terms of the GNU General Public License as published by | |
12 | ;; the Free Software Foundation; either version 2, or (at your option) | |
13 | ;; any later version. | |
b578f267 | 14 | |
e0072c10 RS |
15 | ;; GNU Emacs is distributed in the hope that it will be useful, |
16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;; GNU General Public License for more details. | |
b578f267 | 19 | |
e0072c10 | 20 | ;; You should have received a copy of the GNU General Public License |
b578f267 EN |
21 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 | ;; Boston, MA 02111-1307, USA. | |
e0072c10 | 24 | |
60370d40 PJ |
25 | ;;; Commentary: |
26 | ||
b578f267 | 27 | ;;; Code: |
e0072c10 RS |
28 | |
29 | ;;;###autoload | |
601fa27a RS |
30 | (defun pc-bindings-mode () |
31 | "Set up certain key bindings for PC compatibility. | |
32 | The keys affected are: | |
002c4306 RS |
33 | Delete (and its variants) delete forward instead of backward. |
34 | C-Backspace kills backward a word (as C-Delete normally would). | |
35 | M-Backspace does undo. | |
36 | Home and End move to beginning and end of line | |
37 | C-Home and C-End move to beginning and end of buffer. | |
38 | C-Escape does list-buffers." | |
601fa27a RS |
39 | |
40 | (interactive) | |
41 | (define-key function-key-map [delete] "\C-d") | |
b6384070 RS |
42 | (define-key function-key-map [M-delete] [?\M-d]) |
43 | (define-key function-key-map [C-delete] [?\M-d]) | |
601fa27a | 44 | (global-set-key [C-M-delete] 'kill-sexp) |
b6384070 RS |
45 | (global-set-key [C-backspace] 'backward-kill-word) |
46 | (global-set-key [M-backspace] 'undo) | |
601fa27a | 47 | |
002c4306 RS |
48 | (global-set-key [C-escape] 'list-buffers) |
49 | ||
601fa27a RS |
50 | (global-set-key [home] 'beginning-of-line) |
51 | (global-set-key [end] 'end-of-line) | |
52 | (global-set-key [C-home] 'beginning-of-buffer) | |
53 | (global-set-key [C-end] 'end-of-buffer)) | |
54 | ||
896546cd RS |
55 | (provide 'pc-mode) |
56 | ||
6b61353c | 57 | ;;; arch-tag: df007c05-f885-4cd0-8c1e-487d0f8dd9c9 |
60370d40 | 58 | ;;; pc-mode.el ends here |