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