Comment change.
[bpt/emacs.git] / lisp / emulation / pc-mode.el
1 ;;; pc-mode.el emulate certain key bindings used on PCs.
2 ;; Copyright (C) 1995 Free Software Foundation, Inc.
3
4 ;; Keywords: emulations
5
6 ;; This file is part of GNU Emacs.
7
8 ;; GNU Emacs is free software; you can redistribute it and/or modify
9 ;; it under the terms of the GNU General Public License as published by
10 ;; the Free Software Foundation; either version 2, or (at your option)
11 ;; any later version.
12 ;;
13 ;; GNU Emacs is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public License for more details.
17 ;;
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with GNU Emacs; see the file COPYING. If not, write to
20 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21
22
23 ;;;###autoload
24 (defun pc-bindings-mode ()
25 "Set up certain key bindings for PC compatibility.
26 The keys affected are:
27 Delete (and its variants) delete forward instead of backward.
28 C-Backspace kills backward a word (as C-Delete normally would).
29 M-Backspace does undo.
30 Home and End move to beginning and end of line
31 C-Home and C-End move to beginning and end of buffer.
32 C-Escape does list-buffers."
33
34 (interactive)
35 (define-key function-key-map [delete] "\C-d")
36 (define-key function-key-map [M-delete] [?\M-d])
37 (define-key function-key-map [C-delete] [?\M-d])
38 (global-set-key [C-M-delete] 'kill-sexp)
39 (global-set-key [C-backspace] 'backward-kill-word)
40 (global-set-key [M-backspace] 'undo)
41
42 (global-set-key [C-escape] 'list-buffers)
43
44 (global-set-key [home] 'beginning-of-line)
45 (global-set-key [end] 'end-of-line)
46 (global-set-key [C-home] 'beginning-of-buffer)
47 (global-set-key [C-end] 'end-of-buffer))
48
49 ;; pc-mode.el ends here