Comment change.
[bpt/emacs.git] / lisp / emulation / pc-mode.el
CommitLineData
be010748 1;;; pc-mode.el emulate certain key bindings used on PCs.
ad837797 2;; Copyright (C) 1995 Free Software Foundation, Inc.
e0072c10
RS
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
601fa27a
RS
24(defun pc-bindings-mode ()
25 "Set up certain key bindings for PC compatibility.
26The keys affected are:
002c4306
RS
27Delete (and its variants) delete forward instead of backward.
28C-Backspace kills backward a word (as C-Delete normally would).
29M-Backspace does undo.
30Home and End move to beginning and end of line
31C-Home and C-End move to beginning and end of buffer.
32C-Escape does list-buffers."
601fa27a
RS
33
34 (interactive)
35 (define-key function-key-map [delete] "\C-d")
b6384070
RS
36 (define-key function-key-map [M-delete] [?\M-d])
37 (define-key function-key-map [C-delete] [?\M-d])
601fa27a 38 (global-set-key [C-M-delete] 'kill-sexp)
b6384070
RS
39 (global-set-key [C-backspace] 'backward-kill-word)
40 (global-set-key [M-backspace] 'undo)
601fa27a 41
002c4306
RS
42 (global-set-key [C-escape] 'list-buffers)
43
601fa27a
RS
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
e0072c10 49;; pc-mode.el ends here